in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

AspxTreeList client side event

Last post 9/25/2008 7:27 AM by Timur Adilov. 8 replies.
Page 1 of 1 (9 items)
Sort Posts:
Previous Next
  • 8/27/2008 11:40 AM

    AspxTreeList client side event

    Hi

    I would like to make a tree with elements added dinamicly. Then i would like on double click on node to be able to execute some action more specific i would like to access to database and make a record. Also i would NOT like to fill the tree list in once. I would prefere to fill just the first level nodes, then if some of thoes nodes has child nodes on click on the node to conect to the database and take the childs nodes and append them, because the database i very big. I made very very simple example (attachment) which apends nodes but dosen't show the text. I'm very new in this so i will be pleased if some one made me an example.

    Thx

  • 8/28/2008 2:15 AM In reply to

    Re: AspxTreeList client side event

    Hi,

    Goran Goran:

    Also i would NOT like to fill the tree list in once. I would prefere to fill just the first level nodes, then if some of thoes nodes has child nodes on click on the node to conect to the database and take the childs nodes and append them, because the database i very big.

    I suggest that you review our Virtual Mode Demo.
    It does exactly what you are looking for: child nodes are loaded on demand.

     

     

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 8/28/2008 10:01 AM In reply to

    Re: AspxTreeList client side event

    Hi Alexey

    First thx a lot the Virtual Mode Demo it helped me a lot.

    About the other thing, how can I execute some code on double click on node. I know about the posibilty with client side event, but that is JScript and i'm not good at it and i need to do connection to database and insert a record that i get form the node, dosen't depend if it is a leafe or node that has leafes. I would like if it is posible to execute C# code on double click on node.

    And another thing, when i put Enable Selection, if i check some nodes, and the i collapse that part when i do

     List<TreeListNode> list = treeList.GetSelectedNodes(false);
            foreach (TreeListNode node in list)
            {
                ASPxLabel1.Text += node["filed"].ToString() + " ";
            }

    i dont get the nodes that are in the colapsed part , is it that because i use the Virtual Mode. Because when a expand again the same node i have colapsed the selection are there.

     

    Thx

  • 8/29/2008 7:10 AM In reply to

    Re: AspxTreeList client side event

    Goran Goran:
    how can I execute some code on double click on node

    I suggest that you initiate a custom callback in the client-side NodeDblClick handler.

    Goran Goran:
    i dont get the nodes that are in the colapsed part , is it that because i use the Virtual Mode.

    Yes, in Virtual Mode collapsed nodes do not exist.

     

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 8/29/2008 9:02 AM In reply to

    Re: AspxTreeList client side event

    Hi Alexey

    The custom callback is made and i connect to database and make changes. But when i try to update some label like this
            TreeListNode node = treeList.FocusedNode;
            Label1.Text = node.GetValue("NAME").ToString();

    The Label takes the value but it is not renderd on the page also i try to make

    protected void treeList_CustomCallback(object sender, TreeListCustomCallbackEventArgs e)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<script>");
            sb.Append("window.opener.document.forms(0).submit();");
            sb.Append("</script>");
            Page.RegisterStartupScript("PostBack", sb.ToString());
            Label1.Text = "some tekst";
        }

    but nothing is happening

    thx again

    Kind regards Goran

  • 8/29/2008 10:01 AM In reply to

    Re: AspxTreeList client side event

    External controls aren't refreshed during the TreeList's callbacks.
    Consider transferring extra data via the CustomJSProperties.

    Also, registering of a script via Page.RegisterStartupScript has no effect on callback.

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 9/25/2008 12:51 AM In reply to

    Re: AspxTreeList client side event

    Hi, Alexey.

    Alexey M (Developer Express):

    External controls aren't refreshed during the TreeList's callbacks.
    Consider transferring extra data via the CustomJSProperties.

    Also, registering of a script via Page.RegisterStartupScript has no effect on callback.

     

    Thank you for explanation.

    If I had read this before...

    Could you answer for two questions:

    1) Could you give example of using TreeList's CustomJSProperties event

    2) I have GridView comtrol on one page. Its EnableCallbacks property sets to False,

    client-side function GetRowValue works perfect.

    On other page i have TreeList control, but when i setting EnableCallbacks property to false,

    client-side function GetNodeValues doesn't work (it works normal when EnableCallbacks property is set to true)

  • 9/25/2008 1:56 AM In reply to

    Re: AspxTreeList client side event

    Hi Timur,

    1. Here is the example: http://www.devexpress.com/Support/Center/e/E363.aspx

    2. Please create an issue report in our Support Center.

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 9/25/2008 7:27 AM In reply to

    Re: AspxTreeList client side event

    Thank you very much for rapid response and help.

Page 1 of 1 (9 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED