TreePanel - load root with loader

  1. #1

    TreePanel - load root with loader

    Hi,

    I would like to load the root node of a tree from a loader, as I do for the other nodes, instead of hardcoding it into markup or code behind. Would that be possible? How?

    Thanks.


    This is an example of the tree I would like to work on:

                    <ext:TreePanel ID="selectionTree" runat="server" 
    Title="Select:" RootVisible="false" AutoScroll="true">
    
                        <Loader>
    
                            <ext:TreeLoader 
    DataUrl="TreeSelectorLoader.ashx" />
    
                        </Loader>
    
                        <Root>
    
                            <ext:AsyncTreeNode NodeID="Root" />
    
                        </Root>
    
                        <Listeners>
    
                            <CheckChange Handler="toggleNodeCheck(node);"
     />
    
                        </Listeners>
    
                    </ext:TreePanel>
  2. #2

    RE: TreePanel - load root with loader

    Hi,

    See Examples Explorer - TreePanel/Loaders
    For example
    https://examples1.ext.net/#/TreePane...ageTreeLoader/
  3. #3

    RE: TreePanel - load root with loader

    Hi Vladimir,

    thanks for the answer, but maybe the question was not clear enough.

    I know how to load tree nodes with an ashx, but what i am asking is how to load the ROOT node through the same handler.

    I mean.. if you look at each example, you see that every tree has an hardcoded root (usually Id=0 and Name=Root).
    I would like to avoid that fake node on my tree and, instead, get it from an external loader. Would it be possible?

    Thanks again

Similar Threads

  1. TreePanel without Root node
    By Dominik in forum 1.x Help
    Replies: 3
    Last Post: Jun 25, 2014, 7:07 PM
  2. [CLOSED] TreePanel Clear Root Nodes, Add More from AjaxMethod
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Jun 25, 2014, 4:33 PM
  3. [CLOSED] Programmatically change root text in Treepanel control
    By ewgoforth in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 22, 2010, 11:07 PM
  4. Retrieve treepanel's root after reload
    By whitvanilla in forum 1.x Help
    Replies: 0
    Last Post: Jun 04, 2009, 9:28 AM
  5. [CLOSED] TreePanel + AjaxMethod + AsyncNode + Root
    By state in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 08, 2009, 8:01 AM

Posting Permissions