5

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?

chris
  • 551
  • 1
  • 13
  • 32
  • I found an efficient way to set styles on SlickGrid cells, without using an inner div. It's not trivial, but it does work well: https://stackoverflow.com/a/36562844/218294 – Sam Watkins Apr 12 '16 at 03:10

1 Answers1

7

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?

Community
  • 1
  • 1
chridam
  • 100,957
  • 23
  • 236
  • 235