Skip to main content

addCellCss()

adds a style to a cell

addCellCss(rowId: string | number, colId: string | number, css: string): void;

Parameters:

  • rowId: string | number - the id of a row
  • colId: string | number - the id of a column
  • css: string - the name of the CSS class

Example

<style>
.myCustomClass{
background:greenyellow;
}
</style>

<script>
...
grid.addCellCss("1", "b", "myCustomClass");
</script>

Related sample: Grid. Add cell CSS