This is a migrated thread and some comments may be shown as answers.

[Solved] How to Rebind the TreeView

2 Answers 105 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lilia
Top achievements
Rank 1
Lilia asked on 01 Jun 2011, 04:19 PM
Hello,

I've implemented a custom extension method which I use to bind the TreeView to my items. The problem was that the TreeView doesn't support multiple types of children when using Bind. So my extension method looks s.th. like this:

public static TreeViewBuilder DataBindToIUserCollection(this TreeViewBuilder tree, IUser users)
{
    return tree.Items(items => items.Add.......)
}

This works gread for binding to my collection of users.
The TreeView has context menu, through which I call a Telerik Window control that I use to add new users to the souce. The problem is that when I update the datasource somehow the treeview calls this method DataBindToIUserCollection, but never rebind to the new source!

Can you tell me how I can workaround this?

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 Jun 2011, 06:16 AM
Hi Lilia,

 It is not clear how you rebind the treeview and what the expected behavior is. Could you attach a sample project to this thread so we can check it out?

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lilia
Top achievements
Rank 1
answered on 02 Jun 2011, 08:44 AM
Thank you for your reply. I thought that this was some kind of treeview optimization, but the problem was with me. I managed to resolve my issue.
Tags
TreeView
Asked by
Lilia
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Lilia
Top achievements
Rank 1
Share this question
or