I have a React application with MUI DataGrid Pro, where users can select rows using checkboxes. Additionally, I have a validation service that checks the validity of the data for all the rows. My goal is to implement a button that updates the selected rows' data when clicked, but only if all the selected rows pass the validation criteria. If any row fails validation, I want to display proper error messages next to the row or the row should be red.
I've tried using the MUI DataGrid's checkbox selection feature and have implemented the selection change handling. However, I'm not sure how to proceed with the row validation and handling the updates accordingly.
Could anyone provide some guidance or example code on how to achieve this functionality? I would greatly appreciate any suggestions or best practices to ensure a smooth user experience with proper validation feedback. Thank you!