Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slickgrid add colour to a cell/ column or row

Tags:

c#

slickgrid

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?

like image 561
chris Avatar asked Sep 19 '12 11:09

chris


1 Answers

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?

like image 51
chridam Avatar answered Nov 02 '22 04:11

chridam