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
670
7.3 Please tell me there is a better way
posted

Old story...hierarchical datasource (say ancestry like Person->Children.......Person.Children[0].Children.....etc. - every person has zero or more children). 
Want to bind to a grid so..I see 2 options.....

  1. manually define a schema and bind at run-time.  This is how i have always done it but at some point the CurrencyManager starts trying to add new instances of my objects to the data source - this is hugely problematic so
  2. I use a System.Windows.Forms.BindingSource because word is this bypasses the CurrencyManager. Now, in order to avoid crashing the design env i have to set the MaxBandDepth to, say, 10 (serious limitation for an app that doesn't know how deep it will get!!) before binding to this BindingSource.  When the grid designer is all done I have 10 sub bands all with the "browseable" columns available. 
    Now, say i only want to display the peoples Names do I seriously have to go to each band individually and set the visibilty of all other the columns!!
    Surely these days there is a better way to say "hey grid, there is only one band here and one set of columns - i want all levels of the hierarchy to look and behave the same"? And surely it'd be a performace gain too for Infragistics.

Thanks for any input.

 

 

  • 3186
    Offline posted

    You might take a look at using UltraWinTree instead of the grid.  Depends of course on what other features of the grid you may be using.

    Valuelists are not handled as well on the tree and no summaries.  From what I have seen of the WPF version this has been handled better there.

    Still lots of things missing from the WPF grid before I can consider switching.

    Nick