We have created an example of a tree grid here: Tree Grid Validation - Row Edit - StackBlitz for adding and editing rows and has validation added for required fields. What we have noticed happening is that when you edit a row, and have incorrect data, the validation will kick in and not allow you to leave the row, this is the same when you add a new row and enter incorrect data. However, if you add a new row and then immediately click off it, this new row will be added even though the required fields have not had any data entered into them. The cells will be highlighted to show there are validation errors but not until the row has been added to the grid. So how can we go about stopping users from being able to do this? Is there a new even that should be added so validation will kick in even though the user hasn't started typing anything?
Hello,
I have been looking into your comment and yes, this is the correct approach in this situation, which I explained in my answer.
Thank you for using Infragistics components and for your cooperation.
Regards,
Georgi Anastasov
Entry Level Software Developer
Infragistics