Announcement

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

    TreeGrid column span

    I am using two column TreeGrid. For the top level nodes, I want title to span two columns.

    Please advise how to implement this feature?

    #2
    Could you please clarify what this means - what appearance and behavior are you looking for?

    There are a lot of details around whether the columns should be treated separately or not: freezing columns, auto-sizing, editing, resizing, show/hide just for starters.

    Comment


      #3
      Given node structure as { tile: '....', description: '...', children: ... }, I want to show TreeGrid with two columns 'Title' and 'Description'. However for the top level nodes, description is always empty. Default settings result in the following UI. Notice how title of the top level node wraps inside the small cell? I would like this title to span two columns and only wrap if two columns are not enough.

      Click image for larger version

Name:	1-treegrid.PNG
Views:	132
Size:	7.8 KB
ID:	264968Click image for larger version

Name:	2-treegrid.PNG
Views:	115
Size:	7.8 KB
ID:	264969

      Comment


        #4
        Hi, any update on this topic?

        Comment


          #5
          Hi Michael
          Sorry for the delay on this

          A quick for for this would be to set the singleCellValue property for the folder to the value you want to display (in this case "Tranche: Test Tranche 1")
          That will cause it to render that value in a single cell that spans the entire body of the grid, giving you the behavior you're after.

          One note on this: The folder will (correctly) show the right amount of indenting and opener/folder icons before the singleCellValue text you specified. However this setup only makes sense if the tree-field is the first column in the grid - otherwise the indent / icons for the folder rows (which span the whole grid) wouldn't line up with the indent / icons for leaves (where there are multiple cols and the indent/icon is not at the left edge of the grid).

          We'd therefore recommend you disallow reordering any field in front of the Tree field - either by setting field.canReorder to false, or setting canReorderFields to false for your grid

          Regards
          Isomorphic Software
          Last edited by Isomorphic; 29 Mar 2021, 12:22.

          Comment

          Working...
          X