I have played with this forever and finally found out where it goes wrong, just not why. I have a collection which has a collection and so on. It can be endless many levels. The collection has only two properties (which is not relevant). Anyway say my collection looks like this
A->Child A ->GrandChildA->GreatGrandChildA->GreatGreatGrandChildA->GreatGreatGreatGrandChildA
B->ChildB
everything is good. Grid is perfect. BUT if i add my items to the collection upside down, meaning the shorter B tree first, the grid will not paint the last two children on the A tree, the plus sign is there and it expands, but no row UNTIL i click once or twice into the last visible child. I will attach the code. when expanding the second main node, you will see that it does not go all the way down.
I really hope you can help me with this because I will need this functionality.
Best Regards
Rion
I have tested your small application and I see that the grid dispays data correctly. See attached screenshot.
Maybe the reason of behaviour you are getting is the version of infragistics you are using...
Alex
Sorry, I read not carefully the first time:
"UNTIL i click once or twice into the last visible child"
so you do have the problem on your machine, too?
Mike, looking at the screenshot above, you are saying I cannot have 5 bands deep in the second row if the first is only 2 bands deep? Is that the way it is intended? The only way I see out of this is to add a dummy first row with about 8 levels to cover for all the rows to come and then hide it.
rcarpadakis said:Mike, looking at the screenshot above, you are saying I cannot have 5 bands deep in the second row if the first is only 2 bands deep? Is that the way it is intended? The only way I see out of this is to add a dummy first row with about 8 levels to cover for all the rows to come and then hide it.
Yes, that is what I'm saying... sort've. It depends how you data source is implemented. The BindingManager will attempt to get the data structure, as I said, from the active row. In this case, suppose row B is the first row. This is fine and the BindingManager will get it's strcuture. And then it will see it has a child collection. The child collection in this case has a row in it, too, and so that's fine. But now it looks at the child row.
The child row has a property that returns a list. But in order to get the schema of the objects on that list, it has to look at a row on the list. But there is no row. So it can't get the schema. What it will try to do in this case is add an item to the list and then cancel that item via the IEditableObject interface. If your objects don't implement that interface, then it won't work and the BindingManager has no way to retrive the schema for that level of the data.
It could, theoretically, go to the second row and walk down it's chain, but that would be horribly inefficient. It would never know when it had finally gotten the entire structure, so this means it would have to loop through every row of data on every level.So obviously, it does not do this.
thanks that would work, too.
Why don't you want to use UltraDataSource?
I do not have such problem if I replace your datasource(TestCollection) on UltraDataSource.
See attached project.
Alex.