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

Rad Window close and call to function

4 Answers 485 Views
Window
This is a migrated thread and some comments may be shown as answers.
ALEX
Top achievements
Rank 1
ALEX asked on 20 Feb 2011, 02:54 PM
Hi Team,

       Now, i'm old project control are replacing with telerik control. I have face with this problem. I call a rad window, after that how can i call a code behind function. Actual i want to call Rad Menu control server side function and link button. Kindly, please advice to me, it is need urgent.

Best Regards,

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Feb 2011, 10:43 AM
Hello,

You could attach OnClientClose() method to RadWindow and invoke an ajaxRequest() to server to execute some code on server.



-Shinu.
0
ALEX
Top achievements
Rank 1
answered on 21 Feb 2011, 10:46 AM
Hi Shinu,

            Thx. But i'm not family ajax so can you give example or refer link.

Best Regards,

0
Shinu
Top achievements
Rank 2
answered on 22 Feb 2011, 06:35 AM
Hello Alex,

Here is an example for achieving your requirement.
aspx:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
</telerik:RadAjaxManager>
<telerik:RadWindow ID="rwDialog" runat="server" Modal="True" NavigateUrl="Dialog.aspx"
            OpenerElementID="Button1" OnClientClose="clientClose">
</telerik:RadWindow>
<asp:Button ID="Button1" runat="server" Text="Button" />
JavaScript:
function clientClose()
 {
     var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
     ajaxManager.ajaxRequest();
 }
C#:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
   {
        // Execute your code here.
   }


Regards,
Shinu.
0
ALEX
Top achievements
Rank 1
answered on 22 Feb 2011, 05:25 PM
Hi Shinu ,

          Thank for your reply and help. Kindly, please let test it first.

Best Regards,
Tags
Window
Asked by
ALEX
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
ALEX
Top achievements
Rank 1
Share this question
or