SMART datagrid v.1 > Classes > GroupRow

[ grids ver.1.3.8]   Back  Forward

DataLudi.GroupRow.getLeaves  method

Return the terminal rows which have no child rows included in this group row as array. 

function getLeaves (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
    $('#checkLeaves').click(function () {
        var row = grid.focusedRow();
        if (row) {
            var rows = row.getLeaves(true, true);
            grid.checkAll(false);
            grid.checkRows(rows, true);
        }
    });
See Also
count
children
getDescendants
Examples
Row Model
Row Grouping