I have a hierachical data source (object data source..not dataset) that I have bound a win grid to. Unfortunately when I expand a band I intermittently get the link lines displaying the number of rows in the band (indicating that the data is in the datasource and grid seems to know about it) but the actual band and data is not displayed. Other bands expand fine.
e.g.
[band 0]
band0row0
band0row1
|_[band 1]
band1row0
band1row1
|_[band2]row0 (not displayed but link lines on left are displayed)
|_[band2]row1(not displayed but link lines on left are displayed)
The band has not been set to be hidden. I have even tried to rebind the grid after the row expanded event but this doesn't help.
Version 7.2 of wingrid.
Any ideas?
The data source was set to a defined object data source generated via VS. Manually defining the source schema wasn't tried.
By the way... The UltraWinTree control can display non-homogenous data structures. You will lose other features like filtering and summaries, but it may suit your needs better than the grid.
Did you happen to try to manually set the data schema before binding? I was thinking of trying this but wanted to ask before I went to all the effort.
Thanks
not really...it did seem wierd to me than the grid designer could pick up the full object design from the bindingsource but when it came to run time I had to force at least collections/lists etc to be not null.
In the end, I didn't have to populate the collections just make sure the collections (in my hierachical object model) had a count of 0 (essentially a 'new' List<Type>()) - then the band wouldn't be shown (has no rows) but when the underlying collection was populated the binding was correct and the band would render.
Otherwise I would get exceptions thrown on binding...totalnumberofboundcolumns would throw errors, index out of bound, null reference exceptions etc...in the inner exceptions (which the application was silently swallowing).
Not perfect but worked for me....
I was wondering if you had come up with a solution to using non homogenous datatypes. I am having the same problem and was looking for a better solution than having to initialize all the data that is not being used.