Show error on each cell in in-cell editing in kendoreact grid

1 Answer 49 Views
Grid
Abhishek
Top achievements
Rank 2
Iron
Iron
Iron
Abhishek asked on 05 Mar 2024, 09:13 AM

I have a kendo react grid. I am doing in-cell editing.  I have option to upload a file & the file might contain wrong data. when i do the upload i have to show the error highlight on each cell. i have done the upload part & showing the new row on the grid. I am facing issue while highlighting the cell with red color. i have already added custom cell for each columns. Please help

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 06 Mar 2024, 07:11 PM

Hi, Abhishek,

The easiest way to achieve the highlighting for validation would be to validate the input value dynamically on the item change event and mark the value as invalid and then add styles to the cell to indicate that. I can share the following example which showcases this approach:

https://stackblitz.com/edit/react-54kpht-ermmni?file=app%2Frenderers.jsx

Please give this suggestion a try and in case this is not enough to transfer to your app, can you please send us a runnable example with the encountered issue so that I can debug it locally and assist further?

Regards,
Filip
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Abhishek
Top achievements
Rank 2
Iron
Iron
Iron
commented on 13 Mar 2024, 04:38 PM

How to show the entire row background color as red when there is duplicate data?
Filip
Telerik team
commented on 15 Mar 2024, 10:22 AM

Abhishek,

This will require implementing custom logic that checks for a duplicate value and changes the backgroundColor to red if the condition is met. I updated the example above to showcase this functionality:

https://stackblitz.com/edit/react-54kpht-zhgnx2?file=app%2Fmain.jsx

If you enter 'Chai' again for the second row the backgdroundColor will be changed to red.

Regards,
Filip

Tags
Grid
Asked by
Abhishek
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Filip
Telerik team
Share this question
or