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

[Solved] Allways expanded combobox (like a listbox)

1 Answer 123 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 29 Jan 2010, 12:53 PM
Hi,
Is it possible to set the height of the radcombobox so it looks like a listbox?

Why I need this because I want to use IsSeparator (to use like optgroup).
If radlistbox would have the property IsSeparator I used that one! :)

Regards,
Mattias

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 01 Feb 2010, 02:20 PM
Hello Mattias,

RadComboBox doesn't support this functionality. I suggest you use RadListBox, you can set separator items like this:

<telerik:RadListBox ID="RadListBox1" runat="server">
    <Items>
        <telerik:RadListBoxItem Text="item1" />
        <telerik:RadListBoxItem CssClass="separator" />
        <telerik:RadListBoxItem Text="item2" />
        <telerik:RadListBoxItem Text="item3" />
    </Items>
</telerik:RadListBox>

and "separator" css class:

<style type="text/css">
    .separator {
        margin-right:30px;
        padding:0px !important;
        padding-top:1px !important;
        background-color: #ccc !important;
        font-size: 0 !important;
        line-height: 0 !important;
    }  
</style>


Best wishes,
Yana
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
Mattias
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or