:: Documentation >>

row indices

Sets or retrieves the array of the row indices (in display order).

The display position of the grid row is not necessarily the same as the row index in the datasource. It is possible to show only some of the datasource rows (filter) and show them in the different order (sort). The array of the row indices defines which datasource rows correspond to each visible row of the grid.

Syntax

var value = obj.getRowIndices(); 
obj.setRowIndices(value);        

obj.onRowIndicesChanging = function(value){...}; 
obj.onRowIndicesChanged = function(value){...}; 
obj.onRowIndicesError = function(value){...}; 

Defined in

row model

Examples

var myText = [
    ["Some text", "123", "456.00"],
    ["cell", "456", "789.99"]
];

obj.setRowIndices([1, 0]); // reverse order

Remarks

The default value for row indices is undefined. It means that each row is displayed at the same position as in datasource (display index is equal to the datasource index).

Calling sort(), addRow() or deleteRow() methods will modify the row indices array.

See also

Grid methods: sort, addRow, deleteRow
Row model: count, position, offset, selected, state, height

Comments

deselect of row Anurag (0)
Getting Sorted Grid Data In Current Sort Order ericj (1)
Get contents of grid Daniel (4)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5