Question

I'd like to change the tdCls of a grid column dynamically - hopefully that's possible.

I've set up a jsFiddle here that contains a grid. The first column initially has a tdCls of 'bold-column', which just bolds the text in that column. When you click 'Change Column tdCls' the first column is assigned to the variable column but I'm not sure what to do at that point to change the column's tdCls to 'red-column'.

Any help would be greatly appreciated, thanks!

Was it helpful?

Solution

You just need to set the property on your own and refresh the grid view:

column.tdCls = 'red-column';
grid.getView().refresh();

Here is an updated fiddle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top