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
900
predefined bands
posted

We have a complex data model with a lot of foreign key dependencies between the tables. Our entities have several navigation properties (lists), some of them are recursive.

We have several grids to present the entities. Each of them uses only one (a different one in each grid) navigation property to show a hierarchical table.

We need the same columns in each band, therefore we create the columns and the bands manually, and we attach the same range of columns to the bands. We set the NewBandLoadStyle and the NewColumnLoadStyle to Hide.

It works with MaxBandDepth=3, but not with 6. It takes too long untill the results are presented after the setting of the DataSource property (using a BindingSource). The grid generates hundreds of hidden bands.

We want to avoid the implementing of an ITypedList or the inheritance of entities just for presentation purposes.
Is there a possibility to tell the grid not to generate new bands at all?

Parents
No Data
Reply
  • 469350
    Offline posted

    I'm a little unclear on what you are doing. Your description is very high-level, so it's hard to say exactly what you mean here.

    If you are setting MaxBandDepth to 6 and the grid is creating hundreds of bands, then clearly something is wrong. Is this happening at design-time or run-time?

    Are these bands actually below level 6? Or are they sibling bands? MaxBandDepth only limits the depth of the bands, it doesn't actually limit the number. If you have 100 sibling bands on level 2, MaxBandDepth won't help.

    To answer your question... no, there is no way to stop the grid from generating bands (other than using MaxBandDepth). If the band exists in the data source, the grid will create it.

    Depending on the needs of your application, though, you might want to consider using UltraTree instead o UltraGrid. UltraTree lacks certain grid features like filtering and summaries. But it does allow you to pre-define the data structure so you can avoid creating extra bands/columns that you don't want.

Children