[CLOSED] TreePanel empty folder issue

  1. #1

    [CLOSED] TreePanel empty folder issue

    I have a tree panel on a page that errors as soon as the page is loaded. I stripped the code down for an example and now the error occurs only when expanding the empty folder, but it is the same error so hoping that solving this error will fix the problem in the "real" code. To reproduce just expand the empty folder.
    <%@ Page Language="vb" %>
     <script runat="server">
        
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
       
        End Sub
    
    </script>
    
    <style type="text/css">
        .tree {
        	float  : left;
        	margin : 20px;
        	border : 1px solid #c3daf9;
        }
    </style>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>DragDrop</title>
        <script type="text/javascript">
    
        </script>
    </head>
    <body>
     
        <ext2:ResourceManager ID="ResourceManager" runat="server" />
     
        <div class="tree">
           <ext2:TreePanel ID="tpClient"
                        runat="server"
                        Title="Client"
                        Width="375"
                        Height="650"
                        cls="tree"
                        Border="false"
                        Collapsible="false"
                        UseArrows="true"
                        RootVisible="True"
                        MultiSelect="false"
                        SingleExpand="true"
                        FolderSort="true"> 
                <Fields>
                    <ext2:ModelField Name="ID"></ext2:ModelField>
                    <ext2:ModelField Name="DisplayName"></ext2:ModelField>
                    <ext2:ModelField Name="AccountNumber"></ext2:ModelField>
                </Fields>
                <ColumnModel>
                    <Columns>
                        <ext2:TreeColumn Flex="2" runat="server" Dataindex="DisplayName" Text="Name" />
                        <ext2:Column Flex="1" runat="server" Dataindex="AccountNumber" Text="Account Number" />
                    </Columns>
                </ColumnModel>
      
                <Root>
                    <ext2:Node NodeID="RootClient" Text="Client" Icon="Folder" Expanded="false">
          
                    </ext2:Node>
                </Root>
            </ext2:TreePanel>
        </div>
    
       </body>
    </html>
  2. #2
    If node is not leaf and have no children then tree will initiate request to read children
    So, please define proxy for tree store
    https://examples2.ext.net/#/TreePanel/Loaders/Page/

    or set Leaf="true" for non folder node or set EmptyChildren="true" to point that it is folder node but without children
  3. #3
    Got it. EmptyChildren needs to be true as there are no children when the form first loads.
    Thanks.

Similar Threads

  1. [CLOSED] Combo box Empty Text issue In ASP.net MVC
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 27, 2013, 6:46 AM
  2. Empty form issue
    By errno in forum 2.x Help
    Replies: 1
    Last Post: May 17, 2013, 7:27 AM
  3. [CLOSED] Topbar Treepanel within cardlayout stays empty
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 22, 2010, 9:17 AM
  4. [CLOSED] Icon folder structure
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 08, 2010, 2:13 PM
  5. [CLOSED] /coolite folder and CleanResourceUrl="false"
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 20, 2009, 7:06 AM

Posting Permissions