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

PopUp with RadWindows

3 Answers 97 Views
Window
This is a migrated thread and some comments may be shown as answers.
archimede
Top achievements
Rank 1
archimede asked on 06 May 2010, 01:27 PM
I want to create a popup on my web page. I want to use the RadWindow to accomplish this.

I'd like to invoke the control by server code instead of with window.radopen. Is it possible?

I want also to pass parameters to and from popup. How can I do this?

Has someone a simple example of this?

Thank you.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 May 2010, 01:52 PM
Hi,

It is possible to open RadWindow from code behind, but make sure that VisibleOnPageLoad property of window is set to True. Here is teh example.

C#:
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        RadWindow window1 = new RadWindow(); 
        window1.VisibleOnPageLoad = true
        this.form1.Controls.Add(window1);    
    } 

You can use the window URL to pass parameters that are read on the server-side to configure the controls inside the window. Checkout the following link to know more about this.
Using the URL Query String to Provide Arguments to RadWindow

Regards,
Princy.
0
archimede
Top achievements
Rank 1
answered on 07 May 2010, 11:28 AM
It works, thank you!

Only one thing on parameter-passing. I have this situation:

    - A main page with a formview or some controls 
    - Next to some controls (dropdownlist) I use a button that allow to insert some list new values (with a radwindow "popup")
    - When user insert the value and closes the popup I want the newly inserted value selected in main-form dropdownlist
    - I want also the data inserted by user before opening the popup, remain stored also after the popup closing. If I have 5 dropdownlist controls  and the user selects the values of each of the first 4 and then clicks on the 5th's button to insert a value, when the popup closes, the first 4 selected values must reamain unchanged, and the newly 5th value inserted by popup must be selected
    - If possible I'd like not to use Javascript because my web application has to work without it (Stanca accessiblity law)

I suppose to use the viewstate on main page to store controls data, maybe I can use also URL to pass parameters to/from popup. In this way I have to recall main page load to do reload parameters.

Are there different way to accomplish this without javascript?
0
Georgi Tunev
Telerik team
answered on 11 May 2010, 09:50 AM
Hi archimede,

If you don't want to use JavaScript, you could also try using session, or as an alternative - to use RadWindow as a controls container. In such case the content of the window is on the same page and you can access it directly from codebehind.

Greetings,
Georgi Tunev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
archimede
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
archimede
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or