Piyush Bhatt
Top achievements
Rank 2
Piyush Bhatt
asked on 30 Apr 2008, 08:30 PM
Hi,
I see that there is add_close() method with Radwindow from client side. So, that we can set the client-close handler. What about ClientCallback()? Is there a client side "add_" method available to add a client-callback method?
-Piyush
I see that there is add_close() method with Radwindow from client side. So, that we can set the client-close handler. What about ClientCallback()? Is there a client side "add_" method available to add a client-callback method?
-Piyush
5 Answers, 1 is accepted
0
Hi Piyush,
When using RadWindow for ASP.NET AJAX you can not set the callback function client-side as this functionality is available with RadWindow for ASP.NET. Instead of the callback functionalit, you should use the closing methods. You can find more information about this here.
If you need further assistance, please, open a new support ticket and send us a small, working project with a detailed explanation of the desired behavior and the exact scenario. Once we receive it, we will do our best to help.
Sincerely yours,
Svetlina
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
When using RadWindow for ASP.NET AJAX you can not set the callback function client-side as this functionality is available with RadWindow for ASP.NET. Instead of the callback functionalit, you should use the closing methods. You can find more information about this here.
If you need further assistance, please, open a new support ticket and send us a small, working project with a detailed explanation of the desired behavior and the exact scenario. Once we receive it, we will do our best to help.
Sincerely yours,
Svetlina
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Piyush Bhatt
Top achievements
Rank 2
answered on 08 May 2008, 09:03 PM
I saw following code in the article you listed.
currentWindow.argument = arg;
currentWindow.close();
Now, I am using add_close(closemywindow).
Now, in function closeMyWindow(sender, args) - how do i get the value I have set to currentWindow.argumennt? or rather, what is the value stored in 'args' parameter of this close method?
Thanks,
Piyush
currentWindow.argument = arg;
currentWindow.close();
Now, I am using add_close(closemywindow).
Now, in function closeMyWindow(sender, args) - how do i get the value I have set to currentWindow.argumennt? or rather, what is the value stored in 'args' parameter of this close method?
Thanks,
Piyush
0
Accepted
Hello Piyush,
As shown in the documentation topic that Svetlina pointed, you should use the argument property of the sender.
e.g.
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
As shown in the documentation topic that Svetlina pointed, you should use the argument property of the sender.
e.g.
function clientClose(window) |
{ |
if (window.argument != null) |
{ |
alert("OnClientClose:" + window.get_name() + |
" argument:" + window.argument); |
} |
} |
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Piyush Bhatt
Top achievements
Rank 2
answered on 16 May 2008, 03:20 PM
Finally got this working. I wish the documentation was addressing this issue directly.
For those who may have similar issue:
Call the following function when you want to close the window with a return parameter.
function CloseRadWindow2(retval)
{
var owin = GetRadWindow();
owin.argument = retval;
owin.close(retval);
//--don't do this way --> GetRadWindow().close(retval);
}
function yourOnCloseMethod(sender, args)
{
if(sender.argument != null)
{ this is with argument}
}
For those who may have similar issue:
Call the following function when you want to close the window with a return parameter.
function CloseRadWindow2(retval)
{
var owin = GetRadWindow();
owin.argument = retval;
owin.close(retval);
//--don't do this way --> GetRadWindow().close(retval);
}
function yourOnCloseMethod(sender, args)
{
if(sender.argument != null)
{ this is with argument}
}
0
Hello Piyush,
Actually the topic in the documentation regarding using RadWindow as a dialog shows the 2 recommended approaches to send argument to the parent page and explains how to handle the argument:
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Actually the topic in the documentation regarding using RadWindow as a dialog shows the 2 recommended approaches to send argument to the parent page and explains how to handle the argument:
- When sending the argument in the close() method, you should read the argument in the ClientCallBack function on the parent page.
- When using the argument property of the window object, it can be read in the OnClientClose function on the parent page - as you did in your case.
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center