Losing CSS Styling on table re-rednering
Losing CSS Styling on table re-rednering
I have a datatable that re-draws when a dropdown menu is changed. The data refreshes fine, but I also have potentially CSS styling [warning/error highlights] for some of the column cells when data meets a certain criteria. However, when I change the dropdown menu from a select that does not have these CSS stylings on the cells to one that should, the table that should have them also does not.
It appears that the cells aren't being re-rendered, just that the data is being redrawn.
The stranger thing is, if the dropdown selection is set to a table option that has the CSS first, then is navigated away from and back to it will still have the CSS. Not sure if this is a bug or not.
Is there a way to easily run the render steps over again of my table each time the dropdown menu is changed?
Answers
Maybe you can tell us you you are doing this now. Without a code snippet or better a test case its hard to be sure.
However with Datatables you can use
createdRow
,rowCallback
orcolumns.createdCell
to selectively styles cells.Kevin