Cell highlighting

77 views
Skip to first unread message

Meloz

unread,
May 31, 2012, 5:46:13 AM5/31/12
to SlickGrid
At present we are using dataTables and are looking to replace this
with slickgrid. One thing we do is cell highlighting using an
expression e.g. if the item.property is 'x' then css class = 'y' etc.
Datatables provides a draw callback (http://www.datatables.net/forums/
discussion/57/fndrawcallback/p1) so when the grid is drawn we can hook
into the callback and modify the DOM elements as we see fit (using the
css expression). Is there a way to do this in slickgrid either by
adding a draw callback or the abilitity to use a function as the css
class for the cell? The data for the grid arrives at some point in the
future, so we set up the grid with all its configuration and then it
waits to receive data, once received, dynamically adds it to the grid.
This is the reason why we need to use a function to compute the CSS or
use a draw callback.

Thanks.

Michael Leibman

unread,
May 31, 2012, 2:24:38 PM5/31/12
to slic...@googlegroups.com
There are many different ways of doing that.
The easiest is to expose 'getItemMetadata(i)' on your datasource and conditionally specify 'cssClass' on the cells that pass your filter.
Reply all
Reply to author
Forward
0 new messages