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

Style issue when mixing static dropdown boxes with loadondemand dropdown boxes

1 Answer 48 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 10 Oct 2011, 01:06 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivana
Telerik team
answered on 11 Oct 2011, 03:37 PM
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
Tags
ComboBox
Asked by
Paul
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or