SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.getCellIndex  method

Create and return CellIndex object which has the location value specified by parameter rowIndex and column

If do not specify rowIndex, it will use 0, and if do not specify column, it will use First Column. If specify column as string, it will look for the column object having this value as its name. 

function getCellIndex (rowIndex: Integer|GridRow, column: GridColumn): CellIndex;
Returns
CellIndex
Parameters
rowIndex - Integer|GridRow.
column - GridColumn.
Code -1
    var index = grid.getCellIndex(2, grid.columnByField('order_id'));
    // or, by column name
    var index = grid.getCellIndex(2, 'colOrder');
    
    grid.setFocusedIndex(index);
See Also
focusedIndex
focusedRow
focusedColumn
setFocusedIndex
setFocusedRow
getFirstColumn
CellIndex
Examples
Focused Cell