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

1 posts, 0 answers
  1. Kostas Throumoulopoulos
    Kostas Throumoulopoulos avatar
    3 posts
    Member since:
    Jul 2009

    Posted 03 Aug 2009 Link to this post

    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!
Back to Top