RadComboBox for ASP.NET AJAX

RadControls for ASP.NET AJAX

FooterTemplate element of RadComboBox, allows the footer of the items in the drop-down list, to be customized. The footer is especially useful if the item template displays attributes in multiple columns, although it can be used with any RadComboBox item style. It could be used even when RadComboBox does not have an ItemTemplate defined. Just like the ItemTemplate, the FooterTemplate can include any HTML element.

The following example shows how to create a multi-column RadComboBox with a footer that labels the columns of each item.

Note

Both, the FooterTemplate and ItemTemplate, lay out items using a table that fixes column width, so that the footer and items line up properly.

CopyASPX
<telerik:radcombobox 
id="RadComboBox1" 
width="420" 
height="190px" 
runat="server"
highlighttemplateditems="true" 
datasourceid="SqlDataSource1" 
onitemdatabound="RadComboBox1_ItemDataBound">    
<FooterTemplate>        
    <table style="width: 415px; text-align: left">            
        <tr>               
            <td style="width: 125px;">Company Name</td>               
            <td style="width: 125px;">City</td>               
            <td style="width: 125px;">Title</td>               
            <td style="width: 40px;" align="right">                   
                <img alt="" src="img/help.gif" />
            </td>            
        </tr>        
    </table>    
</FooterTemplate>    
<ItemTemplate>           
    <table style="width: 415px; text-align: left">            
    <tr>               
        <td style="width: 125px;">                  
            <%# DataBinder.Eval(Container.DataItem"CompanyName") %>               
         </td>               
         <td style="width: 125px;">                   
            <%# DataBinder.Eval(Container.DataItem"City") %>               
         </td>               
         <td style="width: 125px;">                  
            <%# DataBinder.Eval(Container.DataItem"ContactTitle") %>               
         </td>               
         <td style="width: 40px;"></td>           
     </tr>          
     </table>    
 </ItemTemplate>
 </telerik:radcombobox>

In order to include data associated with every column in the text of the RadComboBox item, add an ItemDataBound event handler to the RadComboBox.

Defining FooterTemplates at run-time

CopyASPX
<telerik:radcombobox 
    id="RadComboBox2" 
    runat="server" 
    autopostback="true">            
</telerik:radcombobox>

Accessing controls in FooterTemplate

You can find any control embedded in the RadComboBox' FooterTemplate, like:

See Also

Other Resources