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
270
How to refresh wintree after datasource changed
posted

 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???