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
180
Grid Data Hierarchy
posted

I am using UltraWinGrid2007 Vol3 and am trying to use a hierarchical dataset at design time and have run into some problems such as non-responsive applications (for over 30 minutes) and/or error messages which may prevent me from seeing the form layout.

In my dataset are two tables with the following (simplified) structure:

Table:  Plan
PlanId (PK)
PlanDescription
EffectiveDate

Table:  Tree
TreeId (PK)
TreeId_Parent (FK to Tree.TreeId)
PlanId (FK to Plan.PlanId)
TreeDescription
Amount

I plop a grid control on my form which starts the wizard.  I bind the control to my project dataset's Plan table and click the Finish button.

The screen seems to hang but if I leave it alone for 30 to 60 minutes I may either get an error message which will prevent me from viewing the form or it might show the form and my first field will be a col width of 2000 and I cannot change it.

It seems to be creating 99 Bands in my grid.  From reading the other posts on this forum the recommended solution is to set the grid.displaylayout.maxbanddepth = some value (for my purposes 5 was enough).  The next problem was that this property needs to be set before the wizard takes off so I did the following:

I created a new class called UltraGrid_Ex.vb containing the following code:

Public Class UltraGrid_Ex
  Inherits Infragistics.Win.UltraWinGrid.UltraGrid
  Public Sub New()
    MyBase.DisplayLayout.MaxBandDepth = 5
  End Sub
End Class

I compiled (a few times) and (eventually) I could see my new class and I could drag it to my form.

The wizard appeared and I told it to use my project's dataset's Plan table.

It still created the 99 bands but when I clicked Finish it only took a couple seconds before it finished and I did indeed only have 5 bands after all.

Is there a fix for this problem or will I need to keep this solution?

Thanks

Parents
No Data
Reply
  • 469350
    Offline posted

     You could close the wizard, set MaxBandDepth on the grid, then set the grid's DataSource in the designer.

Children
No Data