SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.visitRows  method

Use when visit all rows including the hidden rows of which Parent Row is collapsed state. 

In Grid View or Tree View which has done row grouping, GridBase.rowCount and getRow do not include the hidden rows. If call this method, it will call callback function whenever visit all rows including the hidden rows. 

function visitRows (visibleOnly: boolean, dataOnly: boolean, callback: function);
Returns
Void
Parameters
visibleOnly - boolean. Defaults to false.
Only visit rows which are displayed now.
dataOnly - boolean. Defaults to false.
Only visit data rows of which dataIndex is greater than 0.
callback - function.
function (row:GridRow, count:Integer, index:Integer);
Code -1
    // Get all rows.
    var rows;

    $('#collectRows').click(function () {
        rows = [];
        grid.visitRows(false, false, function (row, count, i) {
            rows.push(row);
        });
    });
See Also
getAllRows
GridRow
GridRow.parent
collapsed
GridBase.rowCount
GridBase.getRow
Examples
Row Model Handling
Row Grouping