chris
chris

Reputation: 561

Slickgrid add colour to a cell/ column or row

I have a slickgrid which works fantastic, it has calculations/ subtotals / expenses etc, The subtotals are not fixed a one row they move down as Items are selected above.

However I am stuck at change the colour of the text in this one cell to red? is it possible? maybe by injecting HTML code in ? and is there a way to colour a whole column background.. say green? or a row to gray?

Upvotes: 5

Views: 8286

Answers (1)

chridam
chridam

Reputation: 103365

Add a CSS class to a column by using the cssClass property on the column definition columnDefinition.cssClass='myCellClass'

To add a specific CSS class to some of the rows, use the "rowClasses" option specified here.

Refer to answers in these two SO questions for detail: How to add a class to a cell in SlickGrid and How to change cell's background color in SlickGrid?

Upvotes: 7

Related Questions