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

Showing a combobox text in itemtemplatecolumn

1 Answer 70 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Vaedan
Top achievements
Rank 1
Vaedan asked on 07 Feb 2014, 10:40 AM
Hi,

I'd like to display my combobox text that I change in the edit mode in the itemTemplate, in a disabled combobox or a label. Here's my aspx : 

<telerik:GridTemplateColumn HeaderText="Catégorie Profil" SortExpression="catProfil" >
                       <ItemTemplate>
                           <telerik:RadComboBox ID="cbxCatProfilDisabled" runat="server" Enabled="false">
                           </telerik:RadComboBox>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <telerik:RadComboBox ID="cbxCatProfil" runat="server">
                           </telerik:RadComboBox>
                       </EditItemTemplate>
</telerik:GridTemplateColumn>

I've tried many things, but no one work.
Thanks for your help

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 11 Feb 2014, 11:21 AM
Hi Vaedan,

Try to use Eval. For Example:

<telerik:GridTemplateColumn HeaderText="Catégorie Profil" SortExpression="catProfil" >
                       <ItemTemplate>                         
 <%# DataBinder.Eval(Container.DataItem"City") %>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <telerik:RadComboBox ID="cbxCatProfil" runat="server">
                           </telerik:RadComboBox>
                       </EditItemTemplate>
</telerik:GridTemplateColumn>

Also look at this post http://www.telerik.com/forums/radgrid---itemtemplate-vs-edititemtemplate

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ComboBox
Asked by
Vaedan
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or