I am attempting to get the ItemTemplate functionality to work.
I am using this code:
I also tried DataBinder.Eval(Container.DataItem, "Text") and DataBinder.Eval(Container, "Text") as was instructed in a documentation article.
Either way, the Text of the items are not displayed in the drop down section when I click on the control.
The contents of the drop-down section are displayed as follows:
Text: ""
Text: ""
The expected contents would be:
Text: "10/3/2010"
Text: "10/10/2010"
The text of the selected item IS displayed as the selected item when an item is selected.
The control behaves as expected if I remove the ItemTemplate section.
How can I get the templates to work as expected?
I am using this code:
<telerik:RadComboBox ID="WeekEndingCB" Font-Size="Large" runat="server" OnSelectedIndexChanged="WeekEndingCB_SelectedIndexChanged" OnTextChanged="WeekEndingCB_TextChanged" AutoPostBack="True" Style="width: 7.2em;"> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> <ItemTemplate> Text: "<%# Eval("Text") %>" </ItemTemplate> <Items> <telerik:RadComboBoxItem Value="10/3/2010" Text="10/3/2010" />
<telerik:RadComboBoxItem Value="10/10/2010" Text="10/10/2010" />
</Items></telerik:RadComboBox>I also tried DataBinder.Eval(Container.DataItem, "Text") and DataBinder.Eval(Container, "Text") as was instructed in a documentation article.
Either way, the Text of the items are not displayed in the drop down section when I click on the control.
The contents of the drop-down section are displayed as follows:
Text: ""
Text: ""
The expected contents would be:
Text: "10/3/2010"
Text: "10/10/2010"
The text of the selected item IS displayed as the selected item when an item is selected.
The control behaves as expected if I remove the ItemTemplate section.
How can I get the templates to work as expected?