Structure
A combobox control consists of items grouped in the Items collection.
When building a combobox from scratch you need to define the following:
- combobox structure - the items hierarchy and content;
- combobox appearance - the visual appearance of the items defined by the applied skins.
The example below shows a single combobox with six items.
| XML Structure |
Copy Code |
|
<Items> <Item Text="Africa" Value="1" /> <Item Text="Australia" Value="2" /> <Item Text="Asia" Value="3" /> <Item Text="Europe" Value="4" /> <Item Text="North America" Value="5" /> <Item Text="South America" Value="6" /> </Items> |
| ASPX |
Copy Code |
|
<rad:RadComboBox id="RadComboBox1" runat="server" skinspath="~/RadControls/ComboBox/Skins"> <Items> <rad:RadComboBoxItem runat="server" Text="Africa" Value="1"></rad:RadComboBoxItem> <rad:RadComboBoxItem runat="server" Text="Australia" Value="2"></rad:RadComboBoxItem> <rad:RadComboBoxItem runat="server" Text="Asia" Value="3"></rad:RadComboBoxItem> <rad:RadComboBoxItem runat="server" Text="Europe" Value="4"></rad:RadComboBoxItem> <rad:RadComboBoxItem runat="server" Text="North America" Value="5"></rad:RadComboBoxItem> <rad:RadComboBoxItem runat="server" Text="South America" Value="6"></rad:RadComboBoxItem> </Items> </rad:RadComboBox> |
The combobox structure can be defined in either of the following methods:
ComboBox Appearance
You can easily customize the appearance of your Telerik RadComboBox instance by using skins. A skin for Telerik RadComboBox contains a custom CSS file and a set of images placed in one folder. The name of the folder defines the name of the skin. Each skin folder must reside in "~/RadControls/ComboBox/Skins". The skin allows customizing the appearance of:
- Items
- Combo Input Box
- Combo Toggle Image
- Combo DropDown Box
- More-Results Box
You can use one of the predefined skins or create your own.
See Also