Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Treegrid - setting same value to multiple grids

    Hi,

    We have a requirement where we have same tree grid (multiple instances, same data) in more than 10 places. We are fetching the data and then holding it at client side (global variable). This avoids the server trips for the treegrid. We are setting the result tree object to all the grids ID.setData(ResultTreeOject). But we were observing one behaviour where in when we expand one tree then same expansion is reflected in other grids also. This is not happening for selection - but only for expansion. Are we missing out on any property. Since all the tree grids are separate, we should not be having any reference between two treegrids.


    This is how we are setting data in tree grid.

    var newTree = isc.ResultTree.create({
    dataSource: dSource,
    modelType: "parent",
    idField: "ABC",
    parentIdField: "DEF",
    data: DATA,
    defaultIsFolder:true,
    isFolderProperty:"isFolder",
    criteria:criteria
    });

    //Where the variable newTree is stored globally and we are assigning it to all the tree grids
    ID.setData(newTree1);

    #2
    Selection is a property of the grid, but open state is a property of the Tree. It's expected to be shared.

    You can create two Tree instances that use the same nodes if you follow special rules - see this explanation.

    Comment

    Working...
    X