Hi,
I am using XamDataGrid, I have a validation where users go from one selected item to another, but if the validation fails, the grid selection should revert back to the previous selected item. How to achieve this programatically?
Thanks, Naveen
I'm just following up on this forum thread. Please, let me know if using the CellActivating event and the SelectedItems work for your scenario.
You can use the CellActivating event to perform your validation logic and disable the selection with the e.Cancel=true. You could also store the previous selected cell and use it to restore the selection when it is needed.
There is also a SelectedItems property of the grid that returns collections of the selected Records, Cells and Fields and which can be also used to select/deselect, add or remove specific items.