質問

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!

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top