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

[Solved] radComboBox rendering issue

3 Answers 363 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 26 Feb 2009, 03:58 PM
I have a RadComboBox that gets dynamically loaded onto a web page at runtime.  Most of the time, it displays fine.  However, once in a while, the down-arrow is not visible and I see the text "select" instead, and when that occurs the actual dropdown selections render as text over my page background rather than in a visible list with highlighting.

More specifics on how the page works:

I have a number of .ascx files for different controls, one of which is the combobox.  Here is the entire markup of the .ascx file:

<%

@ Control Language="C#" AutoEventWireup="true" CodeBehind="ComboBox.ascx.cs" Inherits="PortalGridPage.ComboBox" %>

 

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="radUI" %>

 

 

 

<

asp:Panel runat="server" ID="ComboBoxPanel" CssClass="ComboBoxPanel">

 

 

 

        <asp:Label runat="server" ID="TheLabel" >

 

 

 

        </asp:Label>

 

 

 

        <radUI:RadComboBox runat="server" ID="TheComboBox"

 

 

 

                EnableEmbeddedScripts="True"

 

 

 

                AllowCustomText="True" AutoPostBack="True" >

 

 

 

        </radUI:RadComboBox>

 

 

</

asp:Panel>

 

 

 

 

 


At runtime, based on some configuration info, this .ascx get dynamically loaded within a dynamically built page.

Here is the markup of the page:

<

head runat="server">

 

 

 

        <title></title>

 

 

</

head>

 

 

<

body>

 

 

 

<form id="form1" runat="server">

 

 

 

        <asp:ScriptManager id="ScriptManager" ScriptMode="Release" runat="server" />

 

 

 

        <script type="text/javascript" src="PortalConfigPage.js"></script>

 

 

 

        <script type="text/javascript" src="..\WebResourcesAjax\ValcoGridPanel\Scripts\ValcoGridPanel.js"></script>

 

 

 

        <div>

 

 

 

                <radUI:RadWindowManager ID="TheWindowManager" runat="server"

 

 

 

                                        Skin="Default" >

 

 

 

                        <Windows>

 

 

 

                                <radUI:RadWindow ID="TheChildWindow" runat="server" Height="400px" Width="700px"/>

 

 

 

                        </Windows>

 

 

 

                </radUI:RadWindowManager>

 

 

 

                <radUI:RadAjaxLoadingPanel ID="TheAjaxLoadingPanel" runat="server" Transparency="15"

 

 

 

                                IsSticky="True" Style="position: absolute; left: 200; top: 60; z-index: 999;"

 

 

 

                                Height="240px" Width="240px">

 

 

 

                                <asp:Image ID="Image1" runat="server" Height="160px" Width="240px" AlternateText="Loading..." />

 

 

 

                </radUI:RadAjaxLoadingPanel>

 

 

 

                <RadUI:RadAjaxPanel ID="TheAjaxPanel" runat="server"

 

 

 

                                EnableAJAX="True" EnableEmbeddedScripts="True" LoadingPanelID="TheAjaxLoadingPanel"

 

 

 

                                EnableViewState="True" >

 

 

 

                        <asp:Button ID="EditLayout" runat="server" EnableViewState="False" Text="Edit Page Config" />

 

 

 

                        <asp:Panel ID="ControlArea" runat="server"

 

 

 

                                EnableViewState="True" >

 

 

 

 

 

 

                        </asp:Panel>

 

 

 

                        <asp:Button ID="SaveLayout" runat="server" EnableViewState="False" Text="Save Config" />

 

 

 

                        <asp:Button ID="CancelButton" runat="server" EnableViewState="False" Text="Cancel" />

 

 

 

                </RadUI:RadAjaxPanel>

 

 

 

        </div>

 

 

 

</form>

 

 

</

body>

 

 

</

html>

 

 

 

 

 


The combobox.ascx gets loaded as a child control of the "ControlArea" panel in the page.  In the code-behind for the ComboBox.ascx, I set the fact that we are using embedded skins and the name of the skin based on values in my web.config.  In this case, I set EnableEmbeddedSkins to true and I set the Skin to "WebBlue".  I do this in my override OnInit handler as shown below:

 

 

 

 

base.OnInit(e);

 

 

 

TheComboBox.EnableEmbeddedSkins = PortalGridPage.Properties.

Settings.Default.UseEmbeddedSkins;

 

TheComboBox.Skin = PortalGridPage.Properties.

 

Settings.Default.Skin;

 

 



As you can see in the page markup, the ControlArea panel is inside a RadAjaxPanel, so that interactions with any of my dynamically laoded controls will be able to cause other controls to update.  In this case, I happen to have a control that selects whether or not the dynamicaly loaded ComboBox is visible or not (sets the visibility of the ComboBox.ascx).  Sometimes, when visibility of the ComboBox.ascx becomes True, the displayed RadComboBox does not show the down arrow graphic or the slider area for selection except as text.  This happens in IE7, Firefox, and Chrome, so it is definitely not browser specific.  One thing I do find interesting, but I haven't put my finger on it, is that if I use my Firefox plugin tools to inspect the elements on the page, whereas my RadGrid stuff (that is dunamically loaded on the same page as well in another .ascx) always reflects using WebResource.axd, when I inspect the combo box it is not showing use of WebResource.axd, whether it is displaying properly (matching the WebBlue skin as expected) or whether it is in this odd display problem.  In neither case do my firefox plugin tools show that file as the source of the styles for the combobox, which is odd because the only other stylesheet loaded doesn't duplicate any of the class names for the RadComboBox stuff, so the fact the WebBlue skin is being reflected in the visual look when it is displaying correctly suggests to me it must be finding the WebResource.axd file.

By the way, i am using version 2008.3.1314.35 of the Telerik controls.

Thanks,

Ed Hinton

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 27 Feb 2009, 11:03 AM
Hi Ed,

The problem is that the css skin file for RadComboBox is not registered when the ComboBox.ascx is not visible and also you're using ajax request to make it visible, so there's no way for the skin file to load. In order to fix this I suggest to add the skin files to your project and manually register the css file in the <head> section of the page.

Best regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jose Arevalo
Top achievements
Rank 1
answered on 27 Nov 2009, 04:49 PM
Hi,
Could you explain a little bit more how to do that?, I'm having the same problem with ASP.NET AJAX Q3 2009 radcombobox, and I'm adding the css file to the project and referencing it to the page but I'm still having the problem

Thanks,

Jose
0
Paul
Telerik team
answered on 30 Nov 2009, 10:03 AM
Hello Jose Arevalo,

Please refer to this help article for useful hints on the matter.

Sincerely yours,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Ed
Top achievements
Rank 1
Answers by
Yana
Telerik team
Jose Arevalo
Top achievements
Rank 1
Paul
Telerik team
Share this question
or