[CLOSED] TreePanel Issue

  1. #1

    [CLOSED] TreePanel Issue

    Hi,
    How to deal with the following issue, when there is no child node and the TreePanel RootVisible property is set to false, we are getting the request failure error message.



    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TreeTest.aspx.cs" Inherits="Web.Inventory.TreeTest" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script runat="server" type="text/javascript">
            protected void Page_Load(object sender, EventArgs e)
            {
    
                this.LoadCategoryTreePanel(TreePanel1.Root);
    
            }
    
            private NodeCollection LoadCategoryTreePanel(NodeCollection nodes)
            {
                if (nodes == null)
                {
                    nodes = new NodeCollection();
                }
    
                Node root = new Node();
                root.Text = "Category";
                root.Leaf = false;
                nodes.Add(root);
                Node n;        
               
                //for (int i = 0; i < 4; i++)
                //{
                //    n = new Node();
                //    n.Text = "Node" + i;
                //    root.Children.Add(n);
                //}
                return nodes;
    
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <div>
            <ext:TreePanel Region="West" FrameHeader="false" Icon="ChartOrganisation" ID="TreePanel1"
                RootVisible="False" MarginSpec="5 5 5 5" runat="server" Height="300" Width="250">
            </ext:TreePanel>
        </div>
        </form>
    </body>
    </html>
    Attached Thumbnails Click image for larger version. 

Name:	Tree_snap2.png 
Views:	4 
Size:	6.1 KB 
ID:	4573  
    Last edited by Daniil; Aug 07, 2012 at 5:04 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please set up
    <Store>
        <ext:TreeStore runat="server" AutoLoad="false" />
    </Store>
    for the TreePanel.

Similar Threads

  1. [CLOSED] [1.4] Treepanel Filtering issue
    By MP in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 06, 2012, 10:45 PM
  2. [CLOSED] Treepanel Level issue
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 07, 2012, 12:00 PM
  3. Treepanel webservice issue
    By anulall in forum 1.x Help
    Replies: 0
    Last Post: Jun 20, 2011, 7:14 AM
  4. [CLOSED] [1.0] TreePanel SelectedNode Issue
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 05, 2010, 6:31 PM
  5. [1.0] TreePanel - PageTreeLoader issue
    By pbsoft in forum 1.x Help
    Replies: 1
    Last Post: Aug 04, 2010, 6:26 PM

Tags for this Thread

Posting Permissions