suroma
asked on
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?
ASKER
The datagridview does not have those events. The column being updated is a checkbox column.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK I will. I should be able to check it out in a few days as this task has slipped down the priorities. Thanks.
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