beforeExpand
fires before expanding a row that contains child rows
note
The event works:
- for Grid in the default mode with the
subRow
configuration option - for Grid in the TreeGrid mode (with the
type: "tree"
configuration option)
beforeExpand: (rowId: string | number) => boolean | void;
Parameters:
The callback of the event is called with the following parameter:
rowId: string | number
- the id of an expanded row
Returns:
Return false
to block expanding of a grid; otherwise, true
.
Example
const grid = new dhx.Grid("grid_container", {
type: "tree",
columns: [
// columns config
],
data: dataset,
});
grid.events.on("beforeExpand", (rowId) => {
// your logic here
return false;
});
Change log:
added in v6.4