I have a small form with a radcombobox and 2 radtextboxes as below:
<asp:Label ID="lblHeaderPrinter" runat="server" Text="" Font-Bold="true" Font-Underline="true"></asp:Label>
<table>
<tr>
<td>Manufacturer:</td>
</tr>
<tr>
<td>
<telerik:RadComboBox ID="ddlManufacturer2" AutoPostBack="true" runat="server"
AppendDataBoundItems="true" Skin="Windows7" OnSelectedIndexChanged="ddlManufacturer2_SelectedIndexChanged">
</telerik:RadComboBox>
</td>
</tr>
</table>
<table>
<tr>
<td>Model #:</td>
<td>Price:</td>
</tr>
<tr>
<td><telerik:RadTextBox ID="txtPrinterModel" Width="400px" runat="server"></telerik:RadTextBox></td>
<td>$<telerik:RadTextBox ID="txtPrinterPrice" runat="server"></telerik:RadTextBox></td>
</tr>
</table>
<table><tr><td>
<asp:Button ID="btnAddPrinter" runat="server" Text="ADD Printer" OnClick="btnAddPrinter_Click" />
<asp:Button ID="btnClearP" runat="server" Text="Clear" OnClick="btnClearP_Click" /></td></tr></table>
<asp:Label ID="lblPConfirm" runat="server" Text="" Font-Bold="true" ForeColor="Red"></asp:Label>
So, I've noticed that when I click Add Printer, the form data inserts in my database with the exception of the txtPrinterModel text. Upon further playing around, I discovered that if i have the txtPrinterModel and txtPrinterPrice fields filled in, and then change the selected value of the combobox, the txtPrinterModel field clears out, but the txtPrinterPrice does not. Why would this be the case? How can I prevent the autopostback on the comobbox from affecting the txtPrinterModel text box? I do NOT want to turn the autopost back to false because I'd like to use validator controls, and the ddlManufacturer2_SelectedIndexChanged clears my label out, among other functionality that I'd like to add later.
As of now, the code for ddlManufacturer2_SelectedIndexChanged looks like this and has no interaction with txtPrinterModel
public
void ddlManufacturer2_SelectedIndexChanged(object sender, EventArgs e)
{
lblPConfirm.Text =
"";
}
All of this is on a user control which has a RadAjaxManagerProxy, however, no ajax settings for any of these controls. The RadAjaxManager on the main page also has no ajax settings at the moment.
Please help. I've been trying to fix this issue for 2 days!!!!
Thanks,
Jason