Our blazing fast Grid component built with pure JavaScript


Post by henrique »

Is there a way to define the colors of the grid stripes? What about the color of the selected record?


Post by alex.l »

It is. You can use CSS to override rule or create custom theme and manage CSS variables which is preferable way.
Please check https://bryntum.com/docs/grid/guide/Grid/customization/styling#creating-a-theme
resources/sass/variables.scss contains all variables. On top of the file, "region Grid" part has a list of variable you are looking for.

All the best,
Alex


Post by henrique »

Thanks for the reply. But what I need is not a theme, but to change the color of each row of the grid, depending on the value it has in one of the columns.


Post by alex.l »

change the color of each row of the grid, depending on the value it has in one of the columns.

For these purposes you can use https://bryntum.com/docs/grid/api/Grid/column/Column#config-renderer
In params you will find

cellElement : HTMLElement
Cell element, for adding CSS classes, styling etc. Can be null in case of export
row : Grid.row.Row
Row object. Can be null in case of export. Use the row's API to manipulate CSS class names.

https://bryntum.com/docs/grid/api/Grid/row/Row#function-assignCls

and apply CSS classes with styling you want.

All the best,
Alex


Post Reply