TreePanel Add new nodes direct method

  1. #1

    TreePanel Add new nodes direct method

    i have a tree panel which does not include a root\ children in the markup.
    <ext:ModelField Name="guid" />
    <ext:Toolbar ID="Toolbar1" runat="server">

    <ext:Button ID="btnNewt" runat="server" Text="New" StandOut="true" Icon="Add">
    <Click OnEvent="btnNew_click" Timeout="100000"></Click>

    <ext:TreeColumn ID="TreeColumn1" runat="server" Flex="1" DataIndex="text" />

    <ext:CommandColumn ID="CommandColumn2" runat="server" Width="40">
    <ext:GridCommand CommandName="Select" Icon="Accept" ToolTip-Text="Select Project" />
    <PrepareToolbar Handler="return;" />

    <Command OnEvent="Project_TreeSelect" Timeout="100000">
    <EventMask ShowMask="true"></EventMask>
    Name="Values" Value="#{TreePanel1};">
    <ext:Parameter Name="Valu" Value="node" />


    on page load i am doing this

    Node root = new Node();
    root.NodeID = "Projects";
    root.Leaf = false;
    root.Expanded = true;
    root.Icon = Icon.ChartOrganisation;

    foreach (var a in Projects)
    Node n = new Node();
    n.Text = a.ProjectName;
    n.CustomAttributes.Add(new ConfigItem { Name = "guid", Value = a.ProjectId.ToString() });
    n.Leaf = true;
    n.Icon = Icon.Package;


    this works on page load , but if i call the same method again ( after some addition \ removal from the tree nodes ) the refresh does not happen . what am i doing wrong here ?

    help is appreciated

  2. #2

    Please, don't forget to wrap your code in CODE tag. Read paragraph 3 here:

    About your problem, I guess this example can be helpful:
  3. #3
    Hi Baidaly,

    Thanks for the reply .
    "Please, don't forget to wrap your code in CODE tag" :not sure why would you want me to wrap my code inside 'CODE' i was writing everything server side...well atleast till now .

    but yes ,the example helps.
    Thanks .Kindly close the Thread

Similar Threads

  1. Replies: 2
    Last Post: Jul 15, 2013, 4:06 AM
  2. [CLOSED] Output Cache issue with Direct Method / Direct Event
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 01, 2013, 5:03 AM
  3. Replies: 18
    Last Post: Jan 23, 2013, 3:20 PM
  4. Direct method and direct event over SSL?
    By dimitar in forum 1.x Help
    Replies: 0
    Last Post: Oct 08, 2011, 8:09 PM
  5. [CLOSED] Update a nodes iconcls and cls properties in direct method.
    By Labyrinth in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 02, 2010, 1:29 PM

Tags for this Thread

Posting Permissions