Posted 6 July 2024, 12:08 am EST
I have a NextJS app that uses the MultiRow Grid. We have the following requirements:
- Some CELLS in the grid should be Read Only based on logic.
- The server can send back a message with the data. Display this message immediately below the row of data.
- While editing a cell of data, if the data entered fails validation, display a validation message immediately below the row of data. Keep the cell in edit mode until the user has corrected the error. When the error has been corrected, remove the message.
We have been able to do 1 and 2 but 3 is causing issues. Please refer to the following code for a demonstration of the issues. All of the issues are in the cellEditEnding event. I have put the keyword “QUESTION” in the code to more easily find the issues.
https://stackblitz.com/edit/stackblitz-starters-stgmmf?file=app%2Fpage.tsx
These are the issues we are facing:
Our grid is mostly made up of InputDate controls inside MultiRowCellTemplate CellEdit nodes.
- After the cell has been edited, we are unable to retrieve the value of the date the user entered.
- For some entered dates we need to modify the date entered. How do we change the value of the cell to something different than what the user entered?
- Trying to display a validation message in the grid when the user fails input validation is not working at all. There is a method “showHideSampleError” to demonstrate the technique we are trying to use. When we use it inside the cellEditEnding method it causes an infinite loop.