Update Panel/RadPane causing control borders to change color

3 posts, 0 answers
  1. Steve
    Steve avatar
    3 posts
    Member since:
    May 2013

    Posted 02 May 2013 Link to this post

    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">
                    <telerik:AjaxSetting AjaxControlID="ReportListBox">
                            <telerik:AjaxUpdatedControl ControlID="MenuPanel" />
        <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>
    <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 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 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 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 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 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 class="menu-input">                                   
    <telerik:RadButton ID="RunReportButton" runat="server" Text="Run Report" AutoPostBack="true" OnClientClicked="RunReportButton_ClientClicked" OnClick="RunReportButton_Click"></telerik:RadButton>  

    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. Viktor Tachev
    Viktor Tachev avatar
    2300 posts

    Posted 07 May 2013 Link to this post

    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.

    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.
  3. Steve
    Steve avatar
    3 posts
    Member since:
    May 2013

    Posted 09 May 2013 Link to this post

    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.
Back to Top