SMART datagrid v.1 > Classes > GridDataSet

Back  Forward

DataLudi.GridDataSet.canDeleteRow  method

Return true if can delete the data row in row location. 

function canDeleteRow (row: Number): Boolean;
Returns
Boolean
Parameters
row - Number. required.
Note
When start user deleting in grid view, it will check the value returned from this function first.
In GridDataSet class, it always returns true if row is within the range.
Code -1
    $('#delete').click(function () {
        // In grid, it deletes the focused row.
        var rowIndex = grid.focusedRow().dataIndex();
        if (dataset.canDeleteRow(rowIndex)) {
            dataset.deleteRow(rowIndex);
        }
    });
See Also
canUpdateRow
canAppendRow
canInsertRow
canUpdateValue
Examples
Grid Data Set Edit
Row Deleting