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

Manually Load Data Combobox with Templates

1 Answer 34 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 08 Dec 2009, 02:33 PM
I need to use a code like this:
Combobox with templates

But how can i populate it manually with data?
                        <telerik:RadComboBox ID="cmbVobo" runat="server"   
                            EmptyMessage="-- All --" HighlightTemplatedItems="true" 
                             AllowCustomText="true" Width="80px"  OnClientDropDownClosed="onDropDownClosingV"
                            <ItemTemplate> 
                                <div onclick="StopPropagation(event)" class="combo-item-template"
                                    <asp:CheckBox runat="server" ID="chk1" onclick="onCheckBoxClickU(this)" Checked="true"/> 
                                    <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1"
                                        <%# Eval("Text")%> 
                                    </asp:Label> 
                                </div> 
                            </ItemTemplate> 
                            <Items> 
                                <telerik:RadComboBoxItem Text="No" Value="0" /> 
                                <telerik:RadComboBoxItem Text="Yes" Value="1" /> 
                            </Items> 
                        </telerik:RadComboBox>                                             
 

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 10 Dec 2009, 03:25 PM
This documentation article provides some example of how to add items with Templates programmatically. Reading this should help you achieve your desired implementation.
Tags
ComboBox
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or