use ItemTemplate in RadCombobox with dynamic binding

1 posts, 0 answers
  1. ck
    ck avatar
    28 posts
    Member since:
    Mar 2013

    Posted 29 Apr 2013 Link to this post

    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 
    <telerik:RadComboBox runat="server" ID="tlkBiennium" EmptyMessage="select a biennium from the list" Filter="Contains" Width="200" AppendDataBoundItems="true" DataValueField="BienniumId">
                                    <td><%# DataBinder.Eval(Container.DataItem,"StartYear") %></td>
                                    <td><%# DataBinder.Eval(Container.DataItem,"EndYear") %></td>

    in the code behind:
        tlkBiennium.DataSource = container.Bienniums.ToList();

    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?
Back to Top