rowStyle(index, [new_order], [style])
Class: Table.
Description:
Sets or gets a row style at a specified row index. When the row is removed, the row style is also removed.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
number |
The row index. |
|
|
|
boolean |
false |
Should the index be interpreted as a new sorted order index or original order. Default is |
|
|
Object | null |
An object containing style properties to set, |
Returns:
- When setting the style, an instance of
thisTable is returned, otherwise a current style of specified row is returned.
Type: Object | Table
Examples:
// how to set style for a row index 5
table.rowStyle(5, false, {background:"#FF0000", color:"#FFAAAA", size: 40}});
// how to reset one style a row at index 5
table.rowStyle(5, false, {color:"#FFAAAA"}});
// how to remove all styles from a row at index 5
table.rowStyle(5, false, null});
// How to get style of a row at index 5
let style = table.rowStyle(5);
console.log(style);
