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

RadWindow client & server

1 Answer 32 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 14 Sep 2012, 02:32 PM
I've been struggling to get RadWindows buttons to invoke a server side call as well as the client side javascript in the same click.
If I use a OnClientClick event I am able to get the window to close and refresh the parent, but can't get the server side save function to fire.

I'm not a strong javascript programmer and can't figure how to use javascript to fire the save event on the server side.
Any help is appreciated.
Thanks

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 17 Sep 2012, 11:39 AM
Hello Jay,

If I understand you correctly you have a page loaded in a RadWindow and you wish that a button inside first executes some server-side code then closes the RadWindow. If so - this can be achieved by attaching the server-side handler as usual and simply adding a bit of JavaScript on the page that will get the RadWindow reference and calling this script from the code-behind. I am attaching here a simple example of this.

There is also the option to execute the JavaScript function in the OnClientClick without preventing the postback so that your server handler is also hit, but this may cause problems with the disposing of the page.


Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Jay
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or