layout features of hierarchical views

Posted by: hpd71 on 8 September 2017, 1:02 pm EST

  • Posted 8 September 2017, 1:02 pm EST

    Hi,


    I am evalulating the grid and have almost got everything working.


    My only outstanding issue is how the grid looks when its displaying data in a hierarchical view.


    The parent table only contains one col of data, but i want to have that column with its width being the enture width of the grid.


    I also want to be able to hide the first column of the child table which is the category_id. I have managed to hide it in the parent table with the following line


    FpSpread1_Sheet1.Columns(0).Visible = False


    However that command only works on the parent table.


    I also wanted be able to only show the column headers once, not for eacy section. Is this possible ?


    Also how do i set the names of the cols headers text for the child table ? Everything i do seems to reference/work on the parent table


     


    Thanks


    2008/02/hv.JPG
  • Replied 8 September 2017, 1:02 pm EST

    You don't have to declare 'e' as anything.  It is one of the parameters in the ChildViewCreated event.  Just set that event up in your code.
  • Replied 8 September 2017, 1:02 pm EST

    As far as the width of the column is concerned you can set it to the width of the spread minus the width of the vertical scrollbar.  The rest needs to be done in the ChildViewCreated event.  For example...

    e.SheetView.Columns(0).Visible=False
    e.SheetView.Columns(1).Label="Test"
  • Replied 8 September 2017, 1:02 pm EST

    Hi,


    Sorry to ask what probably is a simple question, but I am a bit lost with this code, and only been using the product for a few days, so very much the beginner on this.


    I assume 'e' is the child sheet object, but how do I set this up in a dim statement.


     


    dim e as new ......


    or am I totally on the wrong path with this.


     

  • Replied 8 September 2017, 1:02 pm EST

    HI,


    Sorry got that figured out now.


    Just one further question, I only want to display the column headers for all the childviews in the first childview at the top of the grid. 


    Is there  a simple way to work out if the childview is the higest level child? My only thoughts is to check what parent row the child is of  to do this


     


    Thanks

  • Replied 8 September 2017, 1:02 pm EST

    That's how I would do it.
  • Replied 8 September 2017, 1:02 pm EST

    Hi,


    Thanks for you help on this. Got it almost working as needed.


    At the moment I have a totalrow, that is being displayed at the bottom of each childview.


    I also need to have a total row, for all the childviews, shown at the botton of the parent view. The parent view only has one col, yet the child views which are all the same number of cols, will at least have 5 cols.


    Can this be done ?

  • Replied 8 September 2017, 1:02 pm EST

    It is not possible to use formulas between child sheets and the parent.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels