jQuery UI Widgets Forums TreeGrid Stuck in tree(grid)

This topic contains 2 replies, has 2 voices, and was last updated by  Monish 8 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Stuck in tree(grid) #76633



    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


    Stuck in tree(grid) #76656

    Peter Stoev

    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

    Stuck in tree(grid) #76685


    Hi Peter,

    Thanks. I got a solution using that “records”

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.