SolutionCottage.com
Posted  06 Mar 2009 - 10:22:43

Category: ASP.net


Databind object with subdata

Issue:
I wanted to bind data for a series of objects. These objects has a Role as a separate entity on the object with subdata on it. I wanted to bind this subdata to the databound field.

Solution:
I solved this with a templatefield and an Eval function in the ItemTemplate.

<asp:TemplateField HeaderText="Role">
<ItemTemplate>
<%# Eval("Role.DisplayName") %>
</ItemTemplate>
</asp:TemplateField>


reference








4 comments:

11/22/2010 12:46:29 PM  Sudhir Bhagat  wrote:

Good job.


11/22/2010 12:45:55 PM  Riken Mistry  wrote:

Very Helpfull


11/22/2010 12:41:20 PM  Sanjay Gupta  wrote:

Good Information is provided on this Website. Thank you so much


11/22/2010 12:40:40 PM  vdvdsvf  wrote:

gdsfsdfgs









© SolutionCottage 2008-2011 7/21/2017 3:33:42 AM