[CLOSED] TreePanel Refresh server side

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] TreePanel Refresh server side

    Hi,
    I'm building a page to filter a treepanel server side.

    Clicking on a button server side, I populate the tree with the following code:

    
    //remove old nodes
                TreeFunctional.Root.Clear();
    
                var q = from myrow in dt.AsEnumerable()
                        where !myrow.Field<int?>("ID_INV_REGISTRY_PARENT").HasValue
                        select 
                            new
                            {
                                Description = myrow.Field<string>("Description")
                            ,   ID_INV_REGISTRY = myrow.Field<int?>("ID_INV_REGISTRY")
                            };
    //load new nodes in the tree
                foreach (var r in q)
                {
                    Ext.Net.Node root = new Ext.Net.Node()
                    {
                        Text = r.Description
                    };
    
    
                    root.CustomAttributes.Add(new ConfigItem("ID_INV_REGISTRY", Convert.ToString(r.ID_INV_REGISTRY)));
    
    
                    root.Children.AddRange(GetFunctionalChildNodes(dt, r.ID_INV_REGISTRY.Value));
    
    
                    root.Expandable = root.Expanded = (root.Children.Count > 0);
    
    
                    TreeFunctional.Root.Add(root);
                }
    //render the content of the tree
                TreeFunctional.Render();
    The treepanel is inside an accordion panel.

    After I run this code, the treepanel stay clear without nodes, if I collapse and expand the treepanel inside the accordion panel, then I can see all the nodes in the tree.

    I used the TreeFunctional.Render() method to render the treepanel after I populate it, but it seems to be not enough, so what method should I use to refresh the tree?

    Thank you for your help.

    Have a good day.
    Last edited by Daniil; Feb 12, 2014 at 1:27 PM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] Refresh gridpanel server side
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 05, 2013, 12:27 PM
  2. [CLOSED] Refresh TreePanel Server Side
    By Antonio09 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 17, 2012, 5:00 PM
  3. How can i refresh the Treepanel in server side
    By NishaLijo in forum 1.x Help
    Replies: 7
    Last Post: Jan 18, 2012, 10:00 PM
  4. Refresh treepanel from server side after event
    By MikeWallaroo in forum 1.x Help
    Replies: 3
    Last Post: Nov 28, 2011, 9:43 AM
  5. Replies: 1
    Last Post: May 13, 2009, 12:14 PM

Posting Permissions