Reputation: 3
RadWindow is closed when the page is refreshed. I have a RadWindow that has a button in <ContentTemplate>
, and when I click on the button the RadWindow is closed. What should I do to not close the RadWindow?
<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="true" VisibleStatusbar="false"
RegisterWithScriptManager="True" EnableShadow="True" ReloadOnShow="true" Width="760px"
Height="350px" runat="server">
<Windows>
<telerik:RadWindow ID="modalPopup" runat="server" Modal="True" OpenerElementID="btnShowWindow">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="AddName" OnClick="Button1_Click" />
<asp:Label ID="lblName" runat="server" ></asp:Label>
</ContentTemplate>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
In aspx.cs:
protected void Button1_Click(object sender, EventArgs e)
{
lblName.Text = "Hello!";
}
Upvotes: 0
Views: 2402
Reputation: 5611
Use AJAX as shown here: http://www.telerik.com/help/aspnet-ajax/radwindow-ajaxifying.html.
This will prevent the full postbacks, so your RadWindow will not dispose and not close. Note that other full postbacks will still close it.
If you need to make sure it is open after a certain server action take a look here: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-opening-from-server.html.
Upvotes: 2