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

index

number

The row index.

[new_order]

boolean

false

Should the index be interpreted as a new sorted order index or original order. Default is false.

[style]

Object | null

An object containing style properties to set, undefined to get the row style object, or null to clear the styles. For example: {background:"#FF0000", color:"#0000FF", size: 40}. Set to null to clear all styles, or set a specific property to null to remove only that style (e.g., {background:null}). If omitted, the function returns the current style properties of the row.

Returns:

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);