I have a situation in my production code where I need to "manually" invoke the row validation. In my case I'm not using the SfDataGrid add new row functionality, instead the user pressing a button to add a row.
Closing the view invokes the save (back to database) functionality, but I don't want to save any records if the validation fails. If the user adds a row and edits it and closes the view the validation is not invoked.
You can achieve the same result by running the following Syncfusion sample
wire the RowValidating event for pasted content in datagrid | WPF - SfDataGrid (syncfusion.com)
Method:
Start the application
Edit the employee name and change it to Null.
Close the application and the private void DataGrid_RowValidating(object sender, RowValidatingEventArgs e) method does not get called. It is only called when you select another row in the table.
How do I invoke the validation, if the focus changes from a row in the grid to any control outside of the grid