Hello,
I have a collection that contains children and those children can contain children etc. When i press on the rootnode to expand it works, when i click on the first childnode to expand it works etc. But when i press on the second childnode for example and i debug through the code (ColumnSetGenerated event) i see that the columnset doesnt contain any columns and it will display the children as Node4 for example instead of the columns.
Can someone help me with this problem?
Thank you.
Hi Kevin,
The first thing I recommend is that you make sure you have the latest service release. This sounds like a bug that was fixed a while ago.
How to get the latest service release - Infragistics Community
If that doesn't help, then I would try binding the same data to the WinGrid and see if it displays the data correctly. If the grid doesn't show the data, either, then that might be an indication that something isn't set up correct on your data source.
Heej Mike,
Thanks for your reply.Uhm i am almost sure that we use the version 9.2. Monday i will try to use an wingrid, will let you know the results.
Thanks.
Hey Mike,
I am not sure how that static method can help me, but maybe i have made a little bit progress.In the ColumnSetGenerated event i now check if the columnset contains columns, if not i loop through a list that contains the columns that need to be shown (The dynamic properties) and then for the hardcoded properties i check the type of the selectednode and then i retrieve the PropertyInfo.Those columns i load into the e.columnset.columns.add.But now my children properties are also being shown as column, how can i prevent this?
Mike Saltzman said:Maybe I misunderstood, but you said in your post above that there are not rows at the time you are binding the tree and that the nodes get added later in the BeforeExpand event. This is too late. The data structure is determined as soon as the parent node is loaded and displayed on the screen, so by the time the user tries to expand that node, the ColumnSet will already have been created - or failed to be created in this case.
But this still doesnt explain why the first node will work correcly, i suppose.
Hmm found that property IsChaptered.
It works for that child, but when i try to expand the childs child, it doesnt do anything. When debugging is tells me that there is one child, but it isnt shown. neither the columnsetgenerated event is called anymore, maybe thats logical, but still dont know why it isnt shown then.
Btw in the meanwhile im trying to dont use a datasource anymore, im trying to build the columnsets and nodes in code.
That static method would generate the ColumnSet for you so you would not have to do it yourself.
KevinKlein said:It works for that child, but when i try to expand the childs child, it doesnt do anything.
Then clearly something is wrong with the ColumnSet for the child's child level of the data. When you are binding, the ColumnSet's Key has to match up to the name of the band. Or, you can assign the ColumnSet explicitly using properties on the various Override objects.
HI Mike ,
I am also facing the same issue.I am using the IList collection to bind the TreeNode.
The problem doesnt occur with First Immediate child of the Node , but other child nodes.
Also, We have child nodes added to the first immediate child , we dont face problem in other child nodes(of base node).
I think its tightly binding the base node with immediate child node.
Can you please help......
Thanks,Ashish.
Any help appriciated.
First thing I would do is... don't use an IList. The BindingManager in DotNet does not work well with IList. Try using a List<T> or better yet, a BindingList<T>.