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. Selected index assumes new sorted row order the way it is viewed (not original order).
To get/set one or more rows selection indexes and specify new or original sort order, use Table > selection method.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
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
