Postback "killing" Textbox-Values

2 posts, 0 answers
  1. Ole Albers
    Ole Albers avatar
    25 posts
    Member since:
    Jun 2012

    Posted 22 Feb 2010 Link to this post

    Hi there

    I don't think, this is telerik-specific but perhaps you can help me anyway.

    I got a Form embedded into a RadAjaxPanel containg some "dumb" TextBoxes and a combobox which initiates a postback:

     <telerik:RadAjaxPanel ID="FormPanel" runat="server" OnAjaxRequest="formPanel_AjaxRequest"
     <telerik:RadTextBox ID="txtUniqueName" runat="server" Width="240" /> 
    <telerik:RadNumericTextBox ID="txtILN" runat="server" Width="240" MaxLength="13"  NumberFormat-GroupSeparator="" Type="Number" MinValue="0" NumberFormat-DecimalDigits="0" /> 
    <telerik:RadComboBox ID="cbxLanguage" runat="server" Width="240px" AutoPostBack="true" OnSelectedIndexChanged="cbxLanguage_SelectedIndexChanged" /> 
     (I removed Table-/TR/TD and other stuff)

    When selecting the Combobox a postback is initiated (as expected and wanted). But before this happens I can still enter some stuff into the textboxes. But these are emptied when the Postback finally takes place.

    Any idea how to solve that issue or at least disable the comboboxes for that period of time?
  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 22 Feb 2010 Link to this post

    I'm don't know if I understand the situation. Are you saying that when you select an item from the RadCombobox that you are able to enter text into the textboxes while the postback from the RadCombobox is being initiated? If so, I can understand why they are being cleared because there was no text there when the RadCombobox had it's SelectedIndexChanged event called.

    If you don't want the textbox controls to be edited while posting back, you should set the LoadingPanelID for the RadAjaxPanel to a RadAjaxLoadingPanel control, so it overlays the RadAjaxPanel with a loading image, thus preventing any edits from occurring before the postback returns.

    I hope that helps
Back to Top