Data Grid - onColumnDataChange timing issue

We are using version 2022.3.6 of Servoy NG Grids and are on 2022.03.4 LTS.

We are using onColumnDataChange to validate data and if I have two rows and am editing the last field in the first row and hit tab, it changes the selected record before running onColumnDataChange. onColumnDataChange then runs but it is now looking at the second row, not the one I just modified.

Best way to sort this issue?

How do you obtain the record that was edited? Are you using the record object that was passed into the event?
https://docs.servoy.com/reference/servo … datachange

Or do you then call getSelectedRecord in the data change event handler?
(it could be that the recording index has already changed, because that onRecordSelection is more like AFTER-record-selection)

Best,
Sean

Thank you! The getSelectedRecord was the issue. I swapped it to getting the record via the index passed into the event and it works perfectly.