There are some problems

  1. #1

    checkbox TreePanel problems

    I through some method . TreePanel checkbox check, however, I am getting a check value when it prompts no value, what method can be solved, I use the Ext.net2.X

    this my method:
    //刷新树
    private NodeCollection BuildTree(NodeCollection Updatenodes, string id)
    {
    Updatenodes = new NodeCollection();
    //获取当前部门
    Node treeNodeRoot = new Node();
    treeNodeRoot.NodeID = "-1";
    treeNodeRoot.Text = "所有部门";
    treeNodeRoot.Expanded = true;
    //把当前id传入
    DeptnodeHas(treeNodeRoot, -1,id);

    Updatenodes.Add(treeNodeRoot);
    return Updatenodes;
    }
    //循环部门子节点
    public void DeptnodeHas(Node nd, int upid, string id)
    {
    DataTable dt;
    DeptmentItemImpl dept = new DeptmentItemImpl(upid);
    dt = dept.SubItemList();
    for (int i = 0; i < dt.Rows.Count; i++)
    {
    Node treeNode = new Node();
    treeNode.NodeID = dt.Rows[i]["id"].ToString();
    treeNode.Text = dt.Rows[i]["name"].ToString();

    if (treeNode.NodeID == id)
    {
    treeNode.Checked = true;
    if (Convert.ToInt32(dt.Rows[i]["RootFlag"].ToString()) != 1)
    {
    treeNode.Leaf = true;
    }
    }
    else
    {
    if (Convert.ToInt32(dt.Rows[i]["RootFlag"].ToString()) != 1)
    {
    treeNode.Leaf = true;
    }
    treeNode.Checked = false;
    }
    treeNode.Expanded = true;
    DeptnodeHas(treeNode, Convert.ToInt32(dt.Rows[i]["id"].ToString()), id);
    nd.Children.Add(treeNode);
    }
    }
    [DirectMethod]
    public string RefreshMenu()
    {
    NodeCollection nodes = this.BuildTree(null);
    return nodes.ToJson();
    }

    But ,why this is value is NUll.

    this.TreePanel1.CheckedNodes == null?
    Last edited by jiaxiang8756; Jun 20, 2012 at 3:20 AM. Reason: checkbox TreePanel problems

Similar Threads

  1. About Ext.NET 2.0.0-rc1 Some of the problems
    By happy61 in forum 2.x Help
    Replies: 2
    Last Post: Jul 15, 2012, 4:06 PM
  2. GUI problems on IE 7.0 & IE 8.0
    By ITECH-Developer in forum 1.x Help
    Replies: 5
    Last Post: Sep 15, 2011, 4:12 PM
  3. PagingToolBar Problems
    By yyyhxm1 in forum 1.x Help
    Replies: 0
    Last Post: Aug 31, 2010, 3:00 AM
  4. two problems!
    By jarremw in forum 1.x Help
    Replies: 0
    Last Post: Jun 29, 2009, 4:37 PM
  5. Problems with HtmlEditor
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Feb 18, 2009, 7:32 PM

Tags for this Thread

Posting Permissions