Problem using OnNodeClick

2 posts, 1 answers
  1. Jasper
    Jasper avatar
    31 posts
    Member since:
    Apr 2009

    Posted 13 May 2009 Link to this post


    I'm trying to use the OnNodeClick method of the TreeView to trigger an server side event but it seems that I've made any mistake.
    I've set the OnNodeClick attribute as you can see in my ASP code:

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1"
                        <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                        <telerik:AjaxUpdatedControl ControlID="Label2" /> 
                        <telerik:AjaxUpdatedControl ControlID="Label3" /> 
                        <telerik:AjaxUpdatedControl ControlID="Label4" /> 
    <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Office2007" OnNodeClick="RadTreeView1_NodeClick"
                        <telerik:RadTreeNode runat="server" Text="Postfach" Expanded="true" > 
                                <telerik:RadTreeNode runat="server" Value="in" Text="Empfangen" PostBack="False"
                                <telerik:RadTreeNode runat="server" Value="out" Text="Gesendet" PostBack="False"
    <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label> 

    And wrote a very short server side command for debugging, just trying to change the text of an label, but nothing changes onlclick.

            protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e) 
                Label5.Text = "Node Clicked"

    I'm quite sure that I've made a very stupid mistake but I can't find out whats going wrong.

    Any help is highly appreciated.

    Kind Regards
  2. Answer
    Simon avatar
    2281 posts

    Posted 13 May 2009 Link to this post

    Hello Jasper,

    Nodes with PostBack set to false will not fire the postback.

    Does clicking on the root not fire a postback?

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top