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
40
Formatting layout of grandchild band in UltraWinGrid
posted

Hi Mike,

I followed a method from another post in this section for adding Parent,Child, Grandchild data to an Ultradatasource. It all works fine. I then set the datasource of an UltraWinGrid to the UltraDataSource. So far so good...

The problem that I have is that i need to format the layout of the bands in the Initialisation event of the UltraWinGrid. Band[0] and Band[1] are available to alter the format but I was expecting Band[2] the Grandchild band to also be there. Having investigated the structure of the datasource at runtime the grandchild band as per the example from the previous post is added as a childband to the childband of the root, so it is not really that suprising that it isn't a band at the same level, but I cannot find a way to access the formatting of this band.

e.layout.band[0].columns["columnname"] is what i use for the band[0] and similarly for band[1] replacing 0 with 1 in the band[].

But this doesn't work in Band[2] as it doesn't exist.

Is there a way to format the columns in the Grandchild band?

Regards,

 

Alex

  • 469350
    Offline posted

    Hi Alex,

    If your third band (Band 2) exists in the UltraDataSource, then it should exist in the InitializeLayout event of the grid. If that's not happening, then something is wrong.

    Are you adding all three bands before you set the DataSource or call SetDataBinding theon the grid?

    Can you post a small sample project demonstrating this behavior?