Hi, not sure what's happening but I'm having a couple of issues with Ajax Prom... working with LoadingPanels and RadNumericTextBoxes
the follow page exhibits 2 unexpected behaviours
1) Clicking on the checkbox will cause a postback as expected but after the first postback the loadingpanel never shows again. It always shows for the dropdown postback though
2) When the checkbox triggers a postback, the RadNumericTextBox style, width, spin button functions and number client validation etc is lost
Any ideas if this is a bug or am I missing the obvious?
Thanks
Scott.
Codebehind
the follow page exhibits 2 unexpected behaviours
1) Clicking on the checkbox will cause a postback as expected but after the first postback the loadingpanel never shows again. It always shows for the dropdown postback though
2) When the checkbox triggers a postback, the RadNumericTextBox style, width, spin button functions and number client validation etc is lost
Any ideas if this is a bug or am I missing the obvious?
Thanks
Scott.
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="NumericInput.aspx.cs" Inherits="Tests_NumericInput" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title>Ajax Numeric Input</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="sm1" runat="server"></asp:ScriptManager> |
| <telerik:RadAjaxManager ID="ram1" runat="server" EnableAJAX="true" EnableHistory="true" EnablePageHeadUpdate="true"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="ddlType"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Height="75px" InitialDelayTime="0" Width="75px"> |
| <asp:Image ID="Image1" runat="server" ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" AlternateText="Loading" /> |
| </telerik:RadAjaxLoadingPanel> |
| <div> |
| <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlType_SelectedIndexChanged"> |
| <asp:ListItem Value="">Select</asp:ListItem> |
| <asp:ListItem Value="Text">Value1</asp:ListItem> |
| <asp:ListItem Value="Number">Value2</asp:ListItem> |
| </asp:DropDownList> |
| </div> |
| <div> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px" LoadingPanelID="LoadingPanel1"> |
| <asp:Panel ID="pnlNumber" runat="Server" Visible="true"> |
| <asp:CheckBox ID="chkNumberValidation" runat="server" Text="Enable" AutoPostBack="true" OnCheckedChanged="chkNumberValidation_CheckChanged" Checked="true"/> |
| <br /> |
| <radI:RadNumericTextBox ID="txtNumberMinLength" Width="60px" runat="server" ShowSpinButtons="True"> |
| <EnabledStyle HorizontalAlign="Right" /> |
| </radI:RadNumericTextBox> |
| <radI:RadNumericTextBox ID="txtNumberMaxLength" Width="60px" runat="server" ShowSpinButtons="True"> |
| <EnabledStyle HorizontalAlign="Right" /> |
| </radI:RadNumericTextBox> |
| </asp:Panel> |
| </telerik:RadAjaxPanel> |
| </div> |
| </form> |
| </body> |
| </html> |
Codebehind
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| public partial class Tests_NumericInput : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void chkNumberValidation_CheckChanged(object sender, EventArgs e) |
| { |
| txtNumberMinLength.Enabled = txtNumberMaxLength.Enabled = chkNumberValidation.Checked; |
| } |
| protected void ddlType_SelectedIndexChanged(object sender, EventArgs e) |
| { |
| pnlNumber.Visible = true; |
| } |
| } |