Show RadWindow based on RadDropDownList Selected Item

2 posts, 1 answers
  1. Saira
    Saira avatar
    24 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post


    I have the following requirement. There is a RadDropDownList containing three items and a RadButton on my submitDocs page. Based on the RadDropDownList selected item, I want to display the RadWindow contents on a RadButton click. Suppose the selected item is Item1, then on button click the Radwindow must display contents from URL. Similarly for another item, display content from another URL. I prefer client side code to accomplish the above.

    Thank You,
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Feb 2013 Link to this post

    Hi Saira,

    Please have a look into the following code to accomplish your requirement.

    <telerik:RadWindow ID="RadWindow1" runat="server">
    <telerik:RadDropDownList ID="RadDropDownList1" runat="server">
            <telerik:DropDownListItem Text="1" />
            <telerik:DropDownListItem Text="2" />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Show" OnClientClicked="OnClientClicked"

    <script type="text/javascript">
        function OnClientClicked(sender, args) {
            var window = $find("<%= RadWindow1.ClientID %>");
            var dropdown = $find("<%= RadDropDownList1.ClientID %>");
            var selectedItem = dropdown.get_selectedItem();
            if (selectedItem._text == "1") {
                window.setSize(400, 400);
            else if (selectedItem._text == "2") {
                window.setSize(400, 400);

  3. DevCraft R3 2016 release webinar banner
Back to Top