How to get the node data in the TreePanel?

  1. #1

    How to get the node data in the TreePanel?

    I want to get the node data in the TreePanel when the checkbox of the node change, my code as:
    var loadOperation = function (pageId, node) {

    App.direct.LoadOperation(pageId, '');
    }

    var nodecheckchange = function (check) {
    App.direct.NodeCheckChange('',check);
    }


    <ext:TreePanel runat="server" ID="treeView_modules" RootVisible="false">
    <Listeners>
    <ItemClick Handler="if (record.data.Page_ID) { loadOperation(record.data.Page_ID, node); return false;}" StopEvent="true" Delay="500" />
    <CheckChange Handler="nodecheckchange(checked);" StopEvent="true" Delay="500">
    </CheckChange>
    </Listeners>
    </ext:TreePanel>
    the node build as following:
    foreach(var n in allQ.Where(item=>item.Parent_ID==m.PageID))
    {
    Node child = new Node();
    child.Text = n.PageName;
    child.IconFile = n.PageIcon;
    child.NodeID = BaseControl.GenerateID();
    child.CustomAttributes.Add(new ConfigItem("Page_ID", n.PageID));
    child.Leaf = true;
    child.Checked = n.IsCheck;
    node.Children.Add(child);
    }
    How can i get the Page_ID value in the codebehinde when the checkbox change?
    Last edited by animalisme; Jul 14, 2019 at 9:54 AM. Reason: less something

Similar Threads

  1. Replies: 2
    Last Post: Dec 12, 2018, 5:20 PM
  2. Replies: 2
    Last Post: Aug 10, 2015, 4:00 PM
  3. TreePanel node loaded: true to have node cached.
    By millenovanta in forum 2.x Help
    Replies: 0
    Last Post: Nov 28, 2013, 12:32 PM
  4. Replies: 11
    Last Post: Feb 06, 2013, 6:09 PM
  5. Replies: 5
    Last Post: Jan 25, 2009, 8:48 AM

Tags for this Thread

Posting Permissions