SMART datagrid v.1 > Classes > GridView

Back  Forward

DataLudi.GridView.expand  method

If group row is Collapsed, it will display the child rows. If recursive is true, it will all display descendant rows. When force is true, even if group row has already been expanded, descendant rows will be expanded when recursive is true

function expand (group: GroupRow, recursive: Boolean, force: Boolean);
Returns
Void
Parameters
group - GroupRow. required.
The group row.
recursive - Boolean. Defaults to false.
If it is true, it will expand all descendant rows.
force - Boolean. Defaults to false.
If it is true, even if the group row has already been expanded, it will expand descendant rows according to recursive. If it is false and has already been expanded, it will do nothing.
Code -1
    $('#expand').click(function (ev) {
        var row = grid.focusedRow();
        if (row instanceof DataLudi.GroupRow) {
            grid.expand(row, $('#recursive').is(':checked'));
        }
    });
See Also
expandAll
collapse
collapseAll
groupBy
Examples
Row Grouping