Announcement

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

    Tree nodes containing multiple ListGrids

    How can I embed a ListGrid inside a Tree or TreeGrid Structure. Basically I want to be able to display mutiple table names in a Tree Structure and inside every Tree node display the Table columns as a ListGrid.

    For every Tree node I will have a differnt ListGrid (1 per node). If you are familiar with Stylus Studio, I am trying to design a similar Grid view structure.

    Something like this but a ListGrid instead of Tree:
    Code:
    isc.TreeGrid.create({
        data:isc.Tree.create({
            parentIdField:"parentID",
            modelType:"parent",
            data:[
                {itemName:"root", parentID:null},
                {itemName:"one", parentID:"root"},
                {itemName:"two", parentID:"root"},
                {itemName:"three", parentID:"one"}
            ],
            titleProperty:"itemName",
            idField:"itemName"
        })
    ,
        top:100,
        dataSource:"supplyCategory",
        left:100,
        ID:"dataTree"
    })

    #2
    Hi amushal,

    If you take a look at the "Experimental" examples in the SDK, in particular the "Embedded Grid" example, you'll see grid-within-grid usage that also works on TreeGrids.

    The detail grid is created by calling grid.openRecordDetailGrid() and passing a second DataSource which is related to the first by foreignKey (see the example).

    These APIs are not officially supported but you are welcome to experiment with them and provide feedback.

    An alternate but more involved approach that relies only on supported APIs would be to either:
    1) simply place the related grid adjacent to the tree rather than embedded in it
    2) disabled fixedRecordHeights on your TreeGrid and create a large row by filling it with a blank HTML <img>, then position the related grid so that it appears over that enlarged row of the tree

    Comment


      #3
      Thanks

      I was thinking along the same lines of the second option you provided but thought it was too much, but that's re-assuring.

      I did not know about the experimental stuff, that looks like what I need with some UI enhancements.

      Thank you

      Comment

      Working...
      X