Hi!
I'm usin' wintree not long ago. So - I bind a tree to List<T> collection. When I add new element to list I do not see it in a tree.
So I have to rebind it completely - it's so ugly ((
This is the code that I use now?
List<Organization> organizationList = (this.organizationTree.DataSource as List<Organization>); organizationList.Add(newOrganization); this.organizationTree.DataSource = null; this.organizationTree.DataSource = organizationList;
So u see I wanna to know the way to make it natural way - "just modify the collection and see the results immediatly in tree".
Am I askin' too much???
Mike - thanks a lot for exhaustive explanation!
U are the greatest support here!
Hi,
The problem here is that a List implements the IList interface instead of IBindingList. IList doesn't have any way to notify bound controls that data has been added. The easiest thing for you to do in this case would be to use a BindingList<Organization> as your tree's data source, rather than a List<Organization>.