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

RadWindow, RadButton and RadAjaxPanel

2 Answers 142 Views
Window
This is a migrated thread and some comments may be shown as answers.
BitShift
Top achievements
Rank 1
Veteran
BitShift asked on 16 Aug 2014, 04:55 PM
I have a page that contains
- An AJAX panel that contains among other things, a few buttons.  These RadButtons have an OnClientClicked handler defined.
- RadWindows within a WindowManager.  The windows have ReloadOnShow and DestroyOnClose = true


When one of the windows is shown, there is a label, which I update the text based on the selected text of a dropdownlist on the main page.
However, when the window is shown, even through it correctly runs its OnLoad method, and APPEARS to have update the label text correctly, its NOT displayed on the label.

Suggestions?


2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Aug 2014, 05:42 AM
Hi BitShift,

I guess you are placing RadButton and DropDownList inside the RadAjaxPanel and Label is inside the RadWindow. Please do the following modifications in your code snippet. Please provide your code if it doesn't help.

ASPX:
<telerik:RadDropDownList ID="rdroplistDemo" runat="server" DefaultMessage="select"
    AutoPostBack="true" OnSelectedIndexChanged="rdroplistDemo_SelectedIndexChanged">
    <Items>
        <telerik:DropDownListItem Text="Item1" />
        <telerik:DropDownListItem Text="Item2" />
        <telerik:DropDownListItem Text="Item3" />
        <telerik:DropDownListItem Text="Item4" />
    </Items>
</telerik:RadDropDownList>
<telerik:RadButton ID="rbtnOpenWindow" runat="server" Text="Open Window" AutoPostBack="false">
</telerik:RadButton>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rdroplistDemo">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lblUpdateText" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
        <telerik:RadWindow ReloadOnShow="true" DestroyOnClose="true" OpenerElementID="rbtnOpenWindow" ID="rwinOpenPage" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblUpdateText" runat="server">
                </asp:Label>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

C#:
protected void rdroplistDemo_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
{
    lblUpdateText.Text = e.Text;
}

Thanks,
Shinu.
0
BitShift
Top achievements
Rank 1
Veteran
answered on 18 Aug 2014, 12:32 PM
Yes, that is what I was doing.  However, I found a work around - simply put the contents of the window in their own aspx, then use the navigateurl property and feed the needed values to the window on the querystring.  Someone else I was talking to mentioned using the AJAX manager as you suggest.  I will keep that in mind in the next section of my project.

thanks
Tags
Window
Asked by
BitShift
Top achievements
Rank 1
Veteran
Answers by
Shinu
Top achievements
Rank 2
BitShift
Top achievements
Rank 1
Veteran
Share this question
or