This topic contains 2 replies, has 2 voices, and was last updated by Monish 11 years ago.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › TreeGrid › Stuck in tree(grid)
Tagged: Angular tree grid, javascript treegrid, jquery tree grid, jqwidgets, tree grid, treegrid control, treegrid hierarchy
This topic contains 2 replies, has 2 voices, and was last updated by Monish 11 years ago.
Hi,
In treegrid when I change the value of a cell in the hierarchy row (parent row), I wanted to update some values in particular 2 or 3 column cells of its sub rows. I used getRows method to get the row count and use for-loop, methods like getCellValue and setCellValue to update as it works in jqxgrid. But later i understood, getRows in treegrid returns only the count of hierarchy rows. So, how can i get count of all rows or just sub rows in treegrid and update values using get and set methods??
Kindly help
Thanks,
Monish
Hi Monish,
TreeGrid’s getRows returns a hierarchy. Each row which has children has its own records array with additional records and so on. This is different than jqxGrid because jqxGrid does not have Hierarchies. In the TreeGrid’s API Documentation about getRows, you will see the following:
List of reserved Row members:
checked - Boolean value. Returns the row's checked state.
expanded - Boolean value. Returns the row's expanded state.
icon - String value. Returns the row's icon url.
leaf - Boolean value. Returns whether the row is a leaf in the hierarchy.
level - Integer value. Returns the row's hierarchy level.
parent - Object. Returns null for root rows. Otherwise, returns the parent row's object
records - Array. Returns the row's sub-rows collection.
selected - Boolean value. Returns the row's selected state.
uid - Number/String value. Returns the row's unique ID/Key.
Take a look at the “records” item.
Best Regards,
Peter Stoev
jQWidgets Team
http://www.jqwidgets.com/
Hi Peter,
Thanks. I got a solution using that “records”
You must be logged in to reply to this topic.