Hi
I want a small clarification on one use case related to IgrDataGrid (https://es.infragistics.com/products/ignite-ui-react/react/components/grids/data-grid/overview).
I am using DataGrid.setEditError for displaying validation errors if the user leaves it empty. While clicking on a different cell while another cell shows the validation error the error message moves upward. I am attaching the screenshot of the same as well.
The above image could be reproduced in the Infragistics grid tutorial:www.infragistics.com/.../cell-editing
I don't want to display this message in this way. Please provide a way to suppress this.
Hoping for a positive response.
Thanks!!!
Hello Shubham,
I have been investigating into the behavior you are seeing, and I have reproduced it.
As a workaround to this issue, if you wish to suppress the message, you can pass an empty string to the setEditError method on the grid. This will still highlight the cell in red, but the black bordered error message will no longer appear. For example:
grid.setEditError(e.editID, " ");
This behavior is unexpected, and as such I have logged it as an issue on our Ignite UI for React GitHub page, here: https://github.com/IgniteUI/igniteui-react/issues/34. The next step will be for a developer to investigate and offer a fix or other resolution to this issue. I encourage you to follow this GitHub issue so you can be notified when it becomes fixed.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thanks for your response. The workaround you suggested can't be implemented as it is required to provide a message to the user. Is there any other way to display validation of the cell (like a tooltip that on hover shows the message or setting an error icon inside the cell when left empty)?
Thanks
The error message that is currently displayed is the extent of the error messaging and highlighting for the setEditError functionality of the IgrDataGrid.
I suppose something you could do is go the route of using an IgrTemplateColumn to provide your own edit error behaviors, but this would require you to handle things like providing an editor in edit mode yourself and you would then need to use an IgrTemplateColumn on every column that you wanted error validation on, which would not really be ideal.
If you would like to see alternate row/cell validation options potentially implemented on the IgrDataGrid, I would recommend suggesting a new feature request for them at our Ignite UI for React GitHub page, here: https://github.com/igniteui/igniteui-react/issues. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.