In the methods below, record means the current record, which can be obtained via the getLocalRow method like this:
where rowid is the id of the row andf grid_id is the id of the gridvar record = jQuery("#grid_id").jqGrid('getLocalRow',rowid);
Method |
Parameters |
Returns |
Description |
---|---|---|---|
collapseNode |
record |
grid object |
Collapse the node at specified record |
collapseRow |
record |
grid object |
Collapse the current row |
delTreeNode |
rowid |
boolean |
Where rowid is the id of the row. Deletes the specified node and all child nodes of that node. Does not delete the node in the server table |
expandNode |
record |
grid object |
Expand the node at specified record |
expandRow |
record |
grid object |
Expand the current row |
getNodeAncestors |
record |
array |
Returns array of the ancestors of the specified record |
getNodeDepth |
record |
number |
Returns the depth of the specified record |
getNodeParent |
record |
array |
Returns the parent node of the specified record |
getNodeChildren |
record |
array |
Returns array of child nodes of the specified record; returns empty array if none |
getRootNodes |
array |
Returns an array of the current root nodes. |
|
isNodeLoaded |
record |
boolean |
Returns true if the node is already loaded |
isVisibleNode |
record |
boolean |
Returns true or false if the node is visible or not |
setTreeRow |
rowid, data |
boolean |
Set a data in specifird rowid. Does not set it at server |
SortTree |
name, direction |
grid object |
Direction is 'asc' (meaning ascending) or 'desc' (meaning descending); sorts the tree with the set name (sortname is from grid colModel option) |