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

Open RadWindow

1 Answer 61 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 16 May 2012, 06:45 PM
How to open RadWindow from server side based on selected item in combobox in SelectedIndexChanged event of combobox?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 May 2012, 06:10 AM
Hi Tina,

Here is the sample code I tried to open RadWindow in SelectedIndexChanged event of RadComboBox.

C#:
protected void RadComboBox1_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
       if(some condition)
                {
                    string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RadWindow", script,true); 
                }
          else
                {
                    string script = "function f(){$find(\"" + RadWindow2.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RadWindow", script, true); 
                }
        }
    }

Hope this helps.

Thanks,
Princy.
Tags
General Discussions
Asked by
Tina
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or