SMART datagrid v.1 > Classes > GroupRow

Back  Forward

DataLudi.GroupRow.getDescendants  method

将该组行的所有子孙行返回为数组。 

function getDescendants (visibleOnly: Boolean, dataOnly: Boolean): [GridRow];
Returns
[GridRow]
Parameters
visibleOnly - Boolean. 默认值为false.
如果为true,就不会包含未被展开的组行的子孙行。
dataOnly - Boolean. 默认值为false.
如果为true,就不会包含非数据行的行。
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
行分组