Article relates to
all versions of RadWindow
April 04, 2008
Last modified by
Provide argument to a dialog, return value from a dialog, assign and invoke callback function
On the main page you should use the OnClientShow function to set the Argument to the dialog being opened. Next, use the ClientCallBackFunction function to receive a result from the dialog, and use it as necessary.
And in your Dialog Page:
To achieve the same functionality with the RadWindow for ASP.NET AJAX (Prometheus) you should implement the following functions:
The ClientCallBackFunction or OnClientClose event handler, which receives the result of the dialog and responds. This example uses both.
On the Main Page:
On the Dialog Page:
To get a reference to the RadWindow object that hosts the content, add the following script to the dialog page:
The onload attribute of the <body> tag reads the argument and uses it to initialize the dialog.
The Cancel button closes the containing window like this:
Invokes the client callback function and provide it with a return value:
Invoke the OnClientClose function and provide it with a return value:
Note, that the argument property can have an object as its value, so you can use it to send multiple values to or from the dialog:
You can find running example of the above mentioned approaches in the attached DialogScenario_Prometheus.zip archive file.