Hi,
i've searching a while in the Forum but i couldn't find how to use Eval within a ItemTemplate.
Whats working:
But when I try to use the ID from Eval to get the corresponding Text like this
I get a InvalidOperationException Context Runtime Error Eval(), XPath() and Bind().
Is there any way to get the ID from the DataField of the current Row within ItemTemplate to work
with it in <% %> and also make some if(!string.IsNullOrEmpty(id)){}...
Thanks.
i've searching a while in the Forum but i couldn't find how to use Eval within a ItemTemplate.
Whats working:
<telerik:GridTemplateColumn UniqueName="infos" DataField="id" HeaderText="Infos"> |
<ItemTemplate> |
Brand: <%#Eval("brandId")%> |
<%=BrandDDL.Items[0].Text%> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
But when I try to use the ID from Eval to get the corresponding Text like this
<telerik:GridTemplateColumn UniqueName="infos" DataField="id" HeaderText="Infos"> |
<ItemTemplate> |
Brand: <%#Eval("brandId")%> |
<%=BrandDDL.Items[(int)Eval("brandId")].Text%> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
I get a InvalidOperationException Context Runtime Error Eval(), XPath() and Bind().
Is there any way to get the ID from the DataField of the current Row within ItemTemplate to work
with it in <% %> and also make some if(!string.IsNullOrEmpty(id)){}...
Thanks.