KaxComboBoxItemTemplate Property |
Namespace: Kettic.AspNet.Controls
[PersistenceModeAttribute(PersistenceMode.InnerProperty)] public virtual ITemplate ItemTemplate { get; set; }
A ITemplate implemented object that contains the template for displaying combo items. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.
The ItemTemplate property sets a template that will be used for all combo items.
The following example demonstrates how to use the ItemTemplate property to add a CheckBox for each item.
ASPX:
<kettic:KaxComboBox runat="server" ID="KaxComboBox1">
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox"></asp:CheckBox>
<asp:Label runat="server" ID="Label1"Text='<%# DataBinder.Eval(Container, "Text") %>'
></asp:Label>
</ItemTemplate>
<Items>
<kettic:KaxComboBoxItem Text="News" />
<kettic:KaxComboBoxItem Text="Sports" />
<kettic:KaxComboBoxItem Text="Games" />
</Items>
</kettic:KaxComboBox>