Hi, I am using a RadCombobox to display a list of values from a DB. i want to display two columns separated by a '-' as the Text so i used
this:
in the code behind:
the items are displayed properly however when select one, I get the name of the class in the combobox.
can someone tell me what i am doing wrong?
thanks
this:
<telerik:RadComboBox runat="server" ID="tlkBiennium" EmptyMessage="select a biennium from the list" Filter="Contains" Width="200" AppendDataBoundItems="true" DataValueField="BienniumId"> <ItemTemplate> <table> <tr> <td><%# DataBinder.Eval(Container.DataItem,"StartYear") %></td> <td>-</td> <td><%# DataBinder.Eval(Container.DataItem,"EndYear") %></td> </tr> </table> </ItemTemplate> </telerik:RadComboBox>in the code behind:
if(!IsPostBack){ tlkBiennium.DataSource = container.Bienniums.ToList(); tlkBiennium.DataBind();}the items are displayed properly however when select one, I get the name of the class in the combobox.
can someone tell me what i am doing wrong?
thanks