Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Groups and Level - hierarchical dataset
posted

I am using WinGrid version 8.2.20082. The requirement for our project was that one database row appear as two rows in the grid. The natural solution is use either RowLayout or Groups and Levels. We started down the path of using RowLayout but unfortunately when you use RowLayout you no longer have the ability to programmatically order the columns. We then shifted our focus to Groups and Levels. This actually works much better except for I have run into an issue when trying to use Groups and Levels with a grid that is bound to a hierarchical dataset. Our use case is that a single child row of the hierarchical dataset appear as two rows in the grid. I am able to use the Groups and Levels function at design time to set the layout but the layout is not honored at runtime. Is this something that is not supported by the grid or have I setup the child rows of the grid incorrectly at design time.

Parents
  • 469350
    Suggested Answer
    Offline posted

    JackCollett said:
    unfortunately when you use RowLayout you no longer have the ability to programmatically order the columns

    This is not true. Of course you can programmatically control the order of the columns. It's just a little more complex in a RowLayout, since you have to work with the column.RowLayoutColumnInfo and the OriginX, OriginY, SpanX, and SpanY.

    JackCollett said:
    I am able to use the Groups and Levels function at design time to set the layout but the layout is not honored at runtime. Is this something that is not supported by the grid or have I setup the child rows of the grid incorrectly at design time.

    If you set up the layout at design-time, you have to be sure that the Keys of each Band and each column matches the run-time datasource exactly. This KB article should help:

    HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?

Reply Children