0

Hi,
I have a windows application of C# which contains two text boxes (where we are entering ID and name) and a datagridView contol. I am storing the data entered through textboxes in the table and displaying data from the tablle in the daaGridView. Now I am adding a button to update the data. Its working fine. Now I want to know the code for the following applicatiion.

"While clicking a row in the dataGridView, the corresponding values of that row should appear in the corresponding textboxes so that I can update only required fields in the record and avoid entering all fields everytime i have to update."

Since this is the dynamic event(We can click the row only when application is running), plz give me exact code.

Waiting for ur kind replies.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by nick.crane
0

Capture the DataGridView CellClick or CellDoubleClick events.
In the event handler test the DataGridViewCellEventArgs RowIndex property.
Using this fill the text boxes with the correct row data.

0

try the selection_changed event of datagridview
the concept of current cell would be applied in this.....

0

try the selection_changed event of datagridview
the concept of current cell would be applied in this.....

Thanks, for your input but did you notice that this thread is over 2 years old and the problem is probably solved by now!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.