SMART datagrid v.1 > Classes > DataSet

Back  Forward

DataLudi.DataSet.getRowStateCount  method

The number of data rows which have one state among States specified in parameter states

function getRowStateCount (states: [DataRowState]): Integer;
Returns
Integer
Parameters
states - [DataRowState]. required.
Code -1
    var stateCount = dataset.getRowStateCount([DataRowState.CREATED, DataRowState.UPDATED]);
    if (stateCount > 0) {
        // If there is the updated or created row, it will be exported to Excel.
        new DataLudi.GridExcelExporter().export(grid, {
            target: "local",
            fileName: "local.xlsx",
        });        
    }
See Also
getStateRows
getAllStateRows
setRowState
setRowStates
DataRowState
Examples
Data Row States