Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi I want to develop the following functionality on data gridveiw:

I have a grid view in my window application and it have various column in it(like address,f_name,L_name etc), and i have also a empty list box control in it.
Now i want the functionality that if i select the first column in grid view its all data compare one by one with data table in database. If it is find in database table then it is OK and if those not find in data table of database remaining data show in the list box.
Posted
Updated 10-Aug-14 20:30pm
v2
Comments
Sergey Alexandrovich Kryukov 11-Aug-14 3:54am    
Not a question.
What have you tried so far?
<dd>—SA</dd>

1 solution

i think u need to know where to put your codes rite?

so you can use this event to build up your logic.

C#
private void dataGridView1_CellClick(object sender,DataGridViewCellEventArgs e){
   // build your logic in this event
}


I hope this will help you...
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Aug-14 3:50am    
This is not an event. This is some method. Not understanding where the event is is a usual problem of the beginners, but why posting "answers"?
Event could be DataGridView.Cell click. If your methods is handling this event, and if you rename this method, it will work the same way, but the name won't be suggestive. Moreover, you should not use such (auto-generated) names, including the names like "DataGridView1"...

—SA
Thilina Chandima 11-Aug-14 4:42am    
check below link this is an event i don't understand what you are saying
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellclick(v=vs.110).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900