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

Item grouping

1 Answer 88 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 24 Oct 2013, 09:14 AM
Does combobox support item grouping? I want a tree like structure to be created inside the combobox without using the item template.
A sample
Smartphone
  Apple
  Motorola
Laptop
  MacBook
  HP

like this.
 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Oct 2013, 10:14 AM
Hi Antony,

Please have a look into the following code snippet I tried.

ASPX:
<telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="select">
    <Items>
        <telerik:RadComboBoxItem Text="SmartPhone" runat="server" />
        <telerik:RadComboBoxItem Text="Apple" runat="server" CssClass="SubItem"/>
        <telerik:RadComboBoxItem Text="Motorola" runat="server" CssClass="SubItem" />
        <telerik:RadComboBoxItem Text="LapTop" runat="server"/>
        <telerik:RadComboBoxItem Text="Mac Book" runat="server" CssClass="SubItem" />
        <telerik:RadComboBoxItem Text="HP" runat="server" CssClass="SubItem" />
    </Items>
</telerik:RadComboBox>

CSS:
<style>
    .SubItem
    {
       margin-left: 10px !important;
    }
</style>

Thanks,
Shinu.

Tags
ComboBox
Asked by
Antony
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or