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

RadMultiColumnComboBox DataBinder.Eval in codebehind

4 Answers 114 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
mesho100200
Top achievements
Rank 1
mesho100200 asked on 19 Aug 2010, 08:42 PM
hi

i use RadMultiColumnComboBox in grid

and add this

 <table style="width:100%; text-align:left">
             <tr>
             <td style="width: 125px;">
            Category Id
             </td>
               <td style="width: 125px;">
            Category Name
             </td>
                
             </tr>
             </table>
        </HeaderTemplate>
        <ItemTemplate>
              <ul>
               
                 <li class="col1"><%#  DataBinder.Eval(Container.DataItem, "Category_id")%> </li>
                <li class="col2"> <%#  DataBinder.Eval(Container.DataItem, "Category_name")%></li>
            </ul>

        </ItemTemplate>

the problem is how can i do this <%#  DataBinder.Eval(Container.DataItem, "Category_id")%>  from codebehind

thanks and sory for my bad English


     

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Aug 2010, 05:42 AM
Hello,


One option is adding Label control in Template of RadCombobox and access the Label from code behind to setting text. The following docmuentation shows how to access template controls.
Finding an item in template


-Shinu.
0
mesho100200
Top achievements
Rank 1
answered on 20 Aug 2010, 02:47 PM


hi Shinu 
  it is ok but when the combobox  in radgrid the items count in combobox =0

0
Accepted
Simon
Telerik team
answered on 20 Aug 2010, 06:53 PM
Hi bahgat,

You can create the multi-column Template programmatically in this case. Please see this Code Library project showing this approach.

Best wishes,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mesho100200
Top achievements
Rank 1
answered on 21 Aug 2010, 11:07 PM
thanks  i will try it
meny thanks
Tags
ComboBox
Asked by
mesho100200
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
mesho100200
Top achievements
Rank 1
Simon
Telerik team
Share this question
or