SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.focusedDataRow  property

目前具有输入焦点的数据行TreeDataRow。 

如果当前行不是连接在数据组行的DataRow或TreeDataRow,就会返回null。 focusedRow可以返回GridRow对象。 

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
聚焦单元格