SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.rowCount  property

It returns the number of Grid Rows. If the grid is being filtered or the row is being grouped, this number can be different from rowCount of DataSet being connected to the grid. And, if Group Row is being collapsed, the hidden child rows will not be included. 

Getter
function rowCount(): Integer
Code -1
    $('#calcSum').click(function () {
        var sum = 0;
        for (var i = 0, cnt = grid.rowCount(); i < cnt; i++) {
            var row = grid.getRow(i);
            if (row.isChecked()) {
                sum += row.getData('salary');
            }
        }
        $('#sum')val(sum);
    });
See Also
dataRowCount
DataSet
DataSet.rowCount
GruopRow
GroupRow.collapsed
Examples
Row Counts
Tree Row Counts