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

Updating RadWindow dropdown from a previous RadWindow

1 Answer 33 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ulonda
Top achievements
Rank 1
Ulonda asked on 04 Jun 2013, 05:35 PM
Hello,

     We have a requirement to allow the user to enter values on a RadWindow (modal type). Based on those values we need to execute business logic on the server and then set a drop down on the next RadWindow. The problem I am facing is that currently we have these set up as one window with separate panels. The first panel is toggled to the next when the first submit is clicked on the window. The second panel should then contain a constrained dropdown of email addresses. I would like this logic to remain on the server as it hits Active Directory and several other business classes in our code. The window is running on client side so even if I call a server side method (onprerender or onpreinit on the window) the next panel is toggled simultaneously and I am unable to set the dropdown contents on the second panel. I thought about just calling another radwindow from code behind. Is there any other way or is this the preferred method to achieve our goals?

Grid - Button click which opens....

Window1 - User answers values that drive drop down on..

Window2 - Contains dropdown that is based on Window1 answers.

-Thanks

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Jun 2013, 12:52 PM
Hi Ulonda,

Both pages in the RadWindows are separate and since you need to use code-behind logic I can suggest a few ideas:

  • register a script from the code-behind, it will open the next RadWindow
  • you can pass the data in several ways:
    • through the script as parameters in the function, as shown here
    • store it in a custom field in the RadWindow object, as shown here
    • store it in the session or cache on the server and access this object in the Page_Load handler on the second dialog page
    • use a querystring in the URL
  • examine this demo that can show a way of returning data from a RadWindow to the originating form. This can be then used to open a second one with the needed data (one of the approaches above)

Ultimately, you would need to use JavaScript to pass data between RadWindows and to open the next instance, because they are also rendered with JavaScript and there are no server events exposed by the RadWindows. The JavaScript logic that will open the second popup has to be initiated from the server so that your code has ran first. You can prepare the needed function in the markup and only call it from the code-behind instead of building an entire script block with strings.



Regards,
Marin Bratanov
Telerik
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 the blog feed now.
Tags
Window
Asked by
Ulonda
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or