SMART datagrid v.1 > Classes > GroupRow

Back  Forward

DataLudi.GroupRow.getDescendants  method

Return all descendant rows of this group row as array. 

function getDescendants (visibleOnly: Boolean, dataOnly: Boolean): [GridRow];
Returns
[GridRow]
Parameters
visibleOnly - Boolean. Defaults to false.
If it is true, it will not contain descendant rows of group row which is not expanded.
dataOnly - Boolean. Defaults to false.
If it is true, it will not contain rows which are not data row.
Code -1
    $('#checkGroup').click(function () {
        var row = grid.focusedRow();
        if (row instanceof DataLudi.GroupRow) {
            var rows = row.getDescendants(true);
            grid.checkAll(false);
            grid.checkRows(rows, true);
        }
    });
See Also
collapsed
descendantCount
getLeaves
Examples
Row Grouping