collapse()
collapses a row that contains child rows by id
note
The method works:
- for Grid in the default mode with the
subRow
configuration option - for Grid in the TreeGrid mode (with the
type: "tree"
configuration option)
collapse(id: string | number): void;
Parameters:
id: string | number
- the id of a row to collapse
Example
const grid = new dhx.Grid("grid_container", {
type: "tree",
columns: [
// columns config
],
data: dataset,
});
grid.collapse("native");