When a user clicks off of a row or does a save I need to check the data that is in the row before committing the data to the datatable.
If I use BeforeRowUpdate, detect a problem then e.cancel the entire datarow gets backed out.
What is the best practice for doing this type of data check?
Hello Mike,
UltraGrid allows you to check user input in several ways. Depending on how you need to save the data from the grid to its data source you may validate input per cell, per row or on entire grid. So, depending on your application logic you need first to set UltraGrid’s UpdateMode. Then you may validate user input by handling:
You can also save the data only when UpdateData is called over the grid. If this is your scenario you will need to check each cell in the grid before call UpdateData. If there are any invalid cells, ask the user to improve them and update data source after all cells are ok.
If you give me some additional information about your scenario I will try to give you solution to your issue.
Please let me know if you have any additional questions.
The property RowUpdateCancelAction set to RetainDataAndActivation made everything work perfectly!