I have a devexpress grid: each row has a checkbox and a text column, when I check the checkbox, the text column is updated. After the text column is updated, I would like to manual save the row to database, but I need to do some convert before I save it. So in beforeRowleave event, I write such convert data and save logic.
My grid is on a form, there is another button on the form “Save Button”. Now in my grid I have 3 rows of record, Let’s call them R1, R2 and R3.
I check the checkbox in R1, R2 and R3 one by one and then I click “Save Button”. But it seems only R1 and R2 fires the beforeRowLeave event, R3 didn’t fire this event. Does this because the gridview loses the focus?
How could I fire a similar event for R3? Thanks a lot!
The BeforeLeaveRow event is not called because the focused GridView row is not actually changed – it is the same last row in the grid. As a solution, I would suggest that you move your logic to the RowUpdated event instead.