Jsgrid: How we can color a particular cell in jsgrid?

Created on 9 Dec 2015  路  1Comment  路  Source: tabalinas/jsgrid

question

>All comments

It depends on your scenario, but it can be done in different ways:

  1. use cellRenderer property of the field http://js-grid.com/docs/#fields
  2. attach class to the row with rowClass
    css // color second cell in the particular row .my-row-custom-class td:nth-child(2) { background: red; }
  3. set padding of td to 0 and render wrapping div with a background color with itemTemplate

Pretty sure there are much more alternatives.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julmarci picture julmarci  路  4Comments

julmot picture julmot  路  3Comments

GlennSeymon picture GlennSeymon  路  5Comments

fredericoregateiro picture fredericoregateiro  路  3Comments

samuelrobertson picture samuelrobertson  路  3Comments