RadComboBox for ASP.NET

ASPX Structure of combobox template Send comments on this topic.
See Also
Templates > ASPX Structure of combobox template

Glossary Item Box

Telerik RadComboBox fully supports templates. You can embed any content inside a Telerik RadComboBox template, including HTML markup and ASP.NET server controls, as well as other third-party controls (and actually any control from Telerik RadControls for ASP.NET suite as well). The syntax is very similar to what you're used to from the default DataGrid control. If you do not specify an ItemTemplate, all Telerik RadComboBox items are rendered using their Text property as plain text. If you specify ItemTemplate, then the respective template is used for rendering.

Example with template:

  Copy Code
<rad:RadComboBox
           
id="RadComboBox1"
           
Runat="server"
           
Height="90px"
           
Width="150px"
           
Skin="WindowsOlive"
           
ShowToggleImage="True">
           
<ItemTemplate>
              
<img src='Img/TelerikProducts/<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>.gif'>
                 
<%# DataBinder.Eval(Container, "Attributes['DisplayName']") %>
           
</ItemTemplate>
           
<Items>
              
<rad:RadComboBoxItem
                    
ImagePath="e"
                    
DisplayName="RadEditor"
                    
Text="RadEditor">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="t"
                    
DisplayName="RadTreeView"
                    
Text="RadTreeView">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="s"
                    
DisplayName="RadSpell"
                    
Text="RadSpell">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="m"
                    
DisplayName="RadMenu"
                    
Text="RadMenu">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="tab"
                    
DisplayName="RadTabstrip"
                    
Text="RadTabstrip">
              
</radcb:RadComboBoxItem>
           
</Items>
        
</rad:RadComboBox>

The example below is the same as above but without using templates: 

  Copy Code
<rad:RadComboBox
           
id="RadComboBox1"
           
Runat="server"
           
Height="90px"
           
Width="150px"
           
Skin="WindowsOlive"
           
ShowToggleImage="True">
           
<Items>
              
<rad:RadComboBoxItem
                    
ImagePath="e"
                    
DisplayName="RadEditor"
                    
Text="RadEditor">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="t"
                    
DisplayName="RadTreeView"
                    
Text="RadTreeView">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="s"
                    
DisplayName="RadSpell"
                    
Text="RadSpell">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="m"
                    
DisplayName="RadMenu"
                    
Text="RadMenu">
              
</radcb:RadComboBoxItem>
              
<rad:RadComboBoxItem
                    
ImagePath="tab"
                    
DisplayName="RadTabstrip"
                    
Text="RadTabstrip">
              
</radcb:RadComboBoxItem>
           
</Items>
</
rad:RadComboBox>

See Also