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

How to call a server side method from Javascript when clicking on the checkbox of RTV

3 Answers 262 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
nikila
Top achievements
Rank 1
nikila asked on 17 Dec 2008, 04:56 AM

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Dec 2008, 05:57 AM
Hi Nikhila,

You can perform a PostBack from the OnClientNodeChecked client event as shwon below.

JS:
 
<script type="text/javascript">  
  
function OnClientNodeChecked()  
{  
alert("Perform PostBack?")  
 __doPostBack('RadTreeView1.ClientID')  
}  
</script>  



Shinu
0
nikila
Top achievements
Rank 1
answered on 17 Dec 2008, 08:32 AM
I was trying to implement the suggestion, But the problem is that i have written a specific function name OnCheck and I would like to call a specific method in the sever side. Can u help me how to get it done.
0
Atanas Korchev
Telerik team
answered on 17 Dec 2008, 08:48 AM
Hi nikila,

You could use RadAjaxManager and its ajaxRequest client-side method. It would fire the AjaxRequest server side event. You can find more info here.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
nikila
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
nikila
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or