SMART datagrid v.1 > Classes > GridDataSet

Back  Forward

DataLudi.GridDataSet.hasData  method

If the data row of the location which is specified by row has actual values, it will return true

function hasData (row: Integer): Boolean;
Returns
Boolean
Parameters
row - Integer. required.
Code -1
    var row = grid.focusedDataRow();
    if (row) {
        var hasData = ds.hasData(row.dataIndex());
        if (!hasData) {
            alert(row.dataIndex() + 'The values do not exist in the row.');
        }
    }
Note
Although the data rows as much as rowCount number exist in data set, it does not mean all rows have the values. When specify the number of rows by setRowCount, empty rows may be added.
See Also
rowCount
examples
Set Row Count