SMART datagrid v.1 > Classes > CellIndex

Back  Forward

DataLudi.CellIndex.getDataIndex  method

It returns dataIndex of grid row of this location. 

If column indicates a valid column object, you do not need to specify parameter grid

function getDataIndex (grid: GridBase): Integer;
Returns
Integer
Parameters
grid - GridBase. required.
Code -1
    $('#deleteRow').click(function () {
        var dataIndex = grid.focusedIndex().getDataIndex();
        if (dataIndex >= 0) {
            grid.dataSource().deleteRow(dataIndex);
        }
    }
See Also
getRow
rowIndex
column
getValue
Examples
Focused Cell