This is a migrated thread and some comments may be shown as answers.

[Solved] Double click on server side

1 Answer 232 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
NEX
Top achievements
Rank 1
NEX asked on 29 Feb 2008, 02:58 PM
I there is a double click client event and I am using it but I was wondering if there is anyway to have the event postback to a server side event also.  Essentially creating a double-click server-side event?

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 03 Mar 2008, 09:15 AM
Hello Alfred Pena,

At the time being RadTreeView does not have a server-side DoubleClick event. You can simulate it by calling the _doPostBack routine from the client-side double click event. You can also use RadAjaxManager and its ajaxRequest method. Then you can consume the server-side AjaxRequest event. Here is a quick example:

ASPX:
<script type="text/javascript"
    function onNodeDoubleClick(sender, args) 
    { 
       var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>"); 
       ajaxManager.ajaxRequest(args.get_node().get_text()); 
    } 
</script> 
 
<telerik:RadAjaxManager runat="server" OnAjaxRequest="AjaxRequest"
    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
        <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="RadTreeView1" /> 
        </UpdatedControls> 
    </telerik:AjaxSetting> 
</telerik:RadAjaxManager> 


codebehind:

public void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
    RadTreeNode doubleClickedNode = RadTreeView1.FindNodeByText(e.Argument); 


Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
NEX
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or