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

Postback "killing" Textbox-Values

1 Answer 72 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ole Albers
Top achievements
Rank 2
Ole Albers asked on 22 Feb 2010, 10:36 AM
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?

1 Answer, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 22 Feb 2010, 02:27 PM
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
Tags
Ajax
Asked by
Ole Albers
Top achievements
Rank 2
Answers by
robertw102
Top achievements
Rank 1
Share this question
or