selectedIndex(index)

Class: Table.

Description:

Sets or returns an index of a single selected row. If multiple rows are selected, it returns an index of the first one. Original row order is used (sorting is disregarded).

Parameters:

Name Type Description

index

number

Index of the row to select. If index is not valid, it will have no effect.

Returns:

When setting index, an instance of this Table is returned, otherwise a currently selected first row's index is returned, or -1 if no row is selected.

Type: number | Table