react-datasheet-grid icon indicating copy to clipboard operation
react-datasheet-grid copied to clipboard

Question: Accessing a cell by its id

Open ainnotate opened this issue 1 year ago • 2 comments

I'm trying to color code cells based on some failure condition.

Is there a way to access a given cell by by its cell id?

Thanks a lot

ainnotate avatar Jul 17 '23 09:07 ainnotate

Any inputs on this?

Basically When user Submits the sheet, the empty cells are to be highlighted. Is there a way to achieve this without accessing the cell by its id?

ainnotate avatar Jul 18 '23 03:07 ainnotate

You can use cellClassName prop to do it Check if the cell value are empty in rowData and if the form is submitted. If yes, then apply the class which has the background you want.

hussamkhatib avatar Jul 18 '23 16:07 hussamkhatib