SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.focusedDataRow  property

Data Row or TreeDataRow which currently has input focus. 

If the current row is not DataRow or TreeDataRow being connected to the row of data set, it will return nullfocusedRow can return GridRow object. 

Getter
function focusedDataRow(): DataRow|TreeDataRow
Code -1
    // grid
    $('#delete').click(function () {
        var row = grid.focusedDataRow();
        if (row) {
            ds.deleteRow(row.dataIndex());
        }
    });
Code -2
    // tree
    $('#delete').click(function () {
        var row = tree.focusedDataRow();
        if (row) {
            ds.deleteRow(row);
        }
    });
See Also
focusedIndex
focusedDataIndex
focusedRow
focusedRowIndex
focusedColumn
onCurrentChanging
onCurrentChanged
onCurrentRowChanged
CellIndex
DataRow
TreeDataRow
Examples
Focused Cell