I have a listbox which changes the enabled property of some textbox/combobox controls below it when the selected index is changed. I have the text/combos in a RadPane which is ajaxified by a RadAjaxManager. Everything works fine, but after the postback updates the controls in the radpane to enabled/disabled, the controls' border color changes, as if they have received the focus. Not sure why this is happening..?
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"ReportListBox"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"MenuPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadSplitter
ID
=
"RadSplitter1"
runat
=
"server"
Orientation
=
"Vertical"
Height
=
"100%"
Width
=
"100%"
>
<
telerik:RadPane
ID
=
"SidePane"
runat
=
"server"
Width
=
"275"
MaxWidth
=
"275"
>
<
div
id
=
"menu-container"
>
<
div
class
=
"menu-input"
>
<
asp:Label
AssociatedControlID
=
"ReportListBox"
runat
=
"server"
Text
=
"Select Report:"
></
asp:Label
>
<
telerik:RadListBox
ID
=
"ReportListBox"
runat
=
"server"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"ReportListBox_SelectedIndexChanged"
></
telerik:RadListBox
>
</
div
>
<
asp:Panel
ID
=
"MenuPanel"
runat
=
"server"
>
<
div
class
=
"menu-input"
>
<
asp:Label
AssociatedControlID
=
"DateFromPicker"
runat
=
"server"
Text
=
"From Date:"
></
asp:Label
>
<
telerik:RadDatePicker
ID
=
"DateFromPicker"
runat
=
"server"
></
telerik:RadDatePicker
><
br
/>
</
div
>
<
div
class
=
"menu-input"
>
<
asp:Label
ID
=
"DateThruLabel"
AssociatedControlID
=
"DateThruPicker"
runat
=
"server"
Text
=
"Thru Date:"
></
asp:Label
>
<
telerik:RadDatePicker
ID
=
"DateThruPicker"
runat
=
"server"
></
telerik:RadDatePicker
> <
br
/>
</
div
>
<
div
class
=
"menu-input"
>
<
asp:Label
ID
=
"Label1"
AssociatedControlID
=
"DepartmentComboBox"
runat
=
"server"
Text
=
"Department:"
></
asp:Label
>
<
telerik:RadComboBox
ID
=
"DepartmentComboBox"
runat
=
"server"
></
telerik:RadComboBox
><
br
/>
</
div
>
<
div
class
=
"menu-input"
>
<
asp:Label
ID
=
"Label4"
AssociatedControlID
=
"CarrierComboBox"
runat
=
"server"
Text
=
"Carrier:"
></
asp:Label
>
<
telerik:RadComboBox
ID
=
"CarrierComboBox"
runat
=
"server"
>
</
telerik:RadComboBox
><
br
/>
</
div
>
<
div
class
=
"menu-input"
>
<
asp:Label
ID
=
"Label2"
AssociatedControlID
=
"ProdBatchComboBox"
runat
=
"server"
Text
=
"Production Batch:"
></
asp:Label
>
<
telerik:RadComboBox
ID
=
"ProdBatchComboBox"
runat
=
"server"
>
</
telerik:RadComboBox
><
br
/>
</
div
>
<
div
class
=
"menu-input"
>
<
asp:Label
AssociatedControlID
=
"SonoTextBox"
runat
=
"server"
Text
=
"SO#:"
></
asp:Label
>
<
telerik:RadTextBox
ID
=
"SonoTextBox"
runat
=
"server"
></
telerik:RadTextBox
>
<
telerik:RadButton
ID
=
"ClearSonoButton"
runat
=
"server"
Text
=
"Clear"
AutoPostBack
=
"false"
OnClientClicked
=
"ClearSonoButton_Clicked"
></
telerik:RadButton
>
</
div
>
</
asp:Panel
>
<
div
class
=
"menu-input"
>
<
telerik:RadButton
ID
=
"RunReportButton"
runat
=
"server"
Text
=
"Run Report"
AutoPostBack
=
"true"
OnClientClicked
=
"RunReportButton_ClientClicked"
OnClick
=
"RunReportButton_Click"
></
telerik:RadButton
>
</
div
>
</
div
>
</
telerik:RadPane
>
protected
void
ReportListBox_SelectedIndexChanged(
object
sender, EventArgs e)
{
RadListBoxItem selectedRow = ReportListBox.Items[ReportListBox.SelectedIndex];
int
reportId = Convert.ToInt32(selectedRow.Value);
bool
enableDepts =
false
;
bool
enableStartDate =
false
;
bool
enableEndDate =
false
;
bool
enableSono =
false
;
bool
enableCarrier =
false
;
bool
enableProdBatch =
false
;
ReportsDataset.ReportsDataTable rptTable = rptTa.GetDataById(reportId);
foreach
(ReportsDataset.ReportsRow row
in
rptTable.Rows)
{
enableDepts = row.flag_dept;
enableStartDate = row.flag_startdate;
enableEndDate = row.flag_enddate;
enableSono = row.flag_sono;
enableCarrier = row.flag_cb;
enableProdBatch = row.flag_prodbatch;
}
DepartmentComboBox.Enabled = enableDepts;
DateFromPicker.Enabled = enableStartDate;
DateThruPicker.Enabled = enableEndDate;
SonoTextBox.Enabled = enableSono;
CarrierComboBox.Enabled = enableCarrier;
}