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

Client-Side Load On Demand problems: TreeView not updating with new nodes

0 Answers 54 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kostas Throumoulopoulos
Top achievements
Rank 1
Kostas Throumoulopoulos asked on 03 Aug 2009, 08:58 AM
Hello!

I have a TreeView and I have loaded all root nodes of my hierarchy. Whenever I click the expand "+" on a node, I get the circling "please wait" indicator and the tree stays that way. I have debugged the code and the event NodeExpand fires allright. Whatsmore, the tree behaves as though it has received the nodes: if I click the button to collapse the supposedly appeared new nodes, nothing happens. But if i click again to expand, I get another circling indicator. I can do this as many times as I want. This is after 3 times:
http://img259.imageshack.us/img259/2840/40193187.jpg

This is my NodeExpand
    void tP_NodeExpand(object sender, RadTreeNodeEventArgs e) 
    { 
         
        MethodInfo rMethod = ServiceType.GetMethod("Retrieve", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy, null, new Type[] { typeof(string) }, null); 
        object[] p = new object[1]; 
        p[0] = "parentID = " + e.Node.Value; 
        e.Node.ExpandMode = TreeNodeExpandMode.ClientSide; 
        ICollection DataCollection = rMethod.Invoke(null, parameters) as ICollection; 
        Populate(DataCollection, e.Node); 
    } 

My populate(collection,rnode) is nothing more than a function to add nodes to rnode.Nodes...
( creates a new childNode for each item in collection, sets its data and does a rnode.Nodes.Add(childNode) )....

For the TreeView, I have set AllowEdit=false, Expanded=true, Allow{Drag,Drop}=false, EnableViewState=true

Any ideas on what's going on?

Thanks!

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Kostas Throumoulopoulos
Top achievements
Rank 1
Share this question
or