Get current value of cell in bound datagridview

I have a bound (List of (object)) datagridview with one column that is editable. I need to get the current value of the edited cell. At the moment it either returns me the value from the underlying dataset or in a different editmode it updates the underlying dataset and therefore I don't know if the row has been edited. I don't want to update the whole object as this would be take too much time. What is the best way of handling this?
suromaAsked:
Who is Participating?
 
Imran Javed ZiaConnect With a Mentor Consultant Software Engineer - .NET ArchitectCommented:
Sorry, I posted for GridView,
Anyhow you can use checkbox click event too for this purpose
0
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,
you can use RowUpdated event if you want to get row index after update the object and here you can get changed values

alternatively you can use RowUpdating event and get can use e.rowindex to get grid row and then get related object and manually call update method.
Thanks
0
 
suromaAuthor Commented:
The datagridview does not have those events. The column being updated is a checkbox column.
0
 
suromaAuthor Commented:
OK I will. I should be able to check it out in a few days as this task has slipped down the priorities. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.