Style issue when mixing static dropdown boxes with loadondemand dropdown boxes

2 posts, 1 answers
  1. Paul
    Paul avatar
    8 posts
    Member since:
    Jul 2011

    Posted 10 Oct 2011 Link to this post

    Hi,

    When I use 2 radcomboboxes on the same pages with the same skin; 1 with LoadOnDemand and 1 with static content, they look different. Please see the screenshot below. How can I make them look exactly the same?

    <telerik:RadComboBox ID="ddAVPFilter" runat="server" EmptyMessage="Choose AVP Area" 
                AutoPostBack="true" Skin="Sunset">
            <Items>
                <telerik:RadComboBoxItem Text="WNEN" Value="WNEN" ></telerik:RadComboBoxItem>
                <telerik:RadComboBoxItem Text="WNES" Value="WNES"></telerik:RadComboBoxItem>
                <telerik:RadComboBoxItem Text="GBRN" Value="GBRN"></telerik:RadComboBoxItem>
                <telerik:RadComboBoxItem Text="GBRS" Value="GBRS"></telerik:RadComboBoxItem>
            </Items>       
        </telerik:RadComboBox>
      
      
      
        <telerik:RadComboBox ID="ddMgrFilter" runat="server" EmptyMessage="Choose the Manager" 
        AutoPostBack="true" ShowMoreResultsBox="True" ItemRequestTimeout="500"
        EnableVirtualScrolling="true" MarkFirstMatch="False" EnableLoadOnDemand="True"
        AllowCustomText="False" IsCaseSensitive="False" Skin="Sunset" />


    Thanks,
    Paul
  2. Answer
    Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 11 Oct 2011 Link to this post

    Hello Paul,

    When the AllowCustomText property of the RadComboBox is set to "true" the input field of the control gets white by default.

    The EnableLoadOnDemand="true" property automatically sets the AllowCustomText property to "true" and ignores the value explicitly set to it (as you have done in the second RadComboBox). More about it could be found in the following help article on our website: RadComboBox: Load on Demand Overview.

    However, to get the desired scenario, you could set the AllowCustomText="true" property to the first RadComboBox and add the following JavaScript code snippet to the page:
    function pageLoad() {
        var combo = $find("ddAVPFilter");
        var inputField = combo.get_inputDomElement();
        inputField.readOnly = true;
    }
    <telerik:RadComboBox ID="ddAVPFilter" runat="server" EmptyMessage="Choose AVP Area"
                AutoPostBack="true" Skin="Sunset" AllowCustomText="true">...
    </telerik:RadComboBox>

    Hope this helps.

    Kind regards,
    Ivana
    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
Back to Top