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

Update Panel/RadPane causing control borders to change color

2 Answers 86 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 02 May 2013, 02:04 PM
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;
 
}

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 07 May 2013, 08:42 AM
Hi Steve,

I isolated the conditions for disabling some of the controls in the RadPane from the provided code, however, i was unable to replicate the behavior shown in your screenshot.
By setting the state of the controls to enabled/disabled the textbox/combobox controls are displayed correctly. Please check the attached project.

The issue you are experiencing could be caused by a global Css rule applied to the disabled element.
Try disabling the Css and check if the control is still highlighted.

Regards,
Victor
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Steve
Top achievements
Rank 1
answered on 09 May 2013, 05:20 PM
Thanks for your reply - I double checked my markup and realized I had both a RadFormDecorator and RadSkinManager, both pointing to different skins.  I commented out the RadFormDecorator, and the problem went away.
Tags
Ajax
Asked by
Steve
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Steve
Top achievements
Rank 1
Share this question
or