Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a class to a cell in SlickGrid

Does anyone has an idea how could I add "myClass" class to some cell (for example, row 5, column 3) in a SlickGrid ?

like image 872
Misha Moroshko Avatar asked Apr 30 '10 03:04

Misha Moroshko


1 Answers

To add a specific CSS class to some of the rows, use the "rowClasses" option added recently in http://github.com/mleibman/SlickGrid/commit/26d525a136e74e0fd36f6d45f0d53d1ce2df40ed

You cannot add a CSS class to a specific cell, only to all cells in a given column - use the "cssClass" property on the column definition.

Perhaps you can use a combination of those two. Another way is to put an inner DIV inside a cell using a custom formatter and set the class there. Since you have access to row/cell within the formatter, you can decide how to render it.

like image 115
Tin Avatar answered Sep 22 '22 16:09

Tin