How to add template field linked to a table?

vcharles
vcharles used Ask the Experts™
on
Hello,

I'm getting the followingt error when attempting to add a template field limked to a ink table, using VB with LINQ, any ideas how to fix this problem? The plan is to replace the ID field in the link table showing on the grid with the name field in the receiver table, receiver and link table are linked by the Receiver_ID field.

Error:

"DataBinding: 'DynamicClass2' does not contain a property with the name 'Receiver'".

Code:

<asp:TemplateField HeaderText ="Receiver" SortExpression = "Receiver">

<ItemTemplate>

<%#Eval("Receiver.Receiver") %>

</ItemTemplate>

</asp:TemplateField>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Development Lead
Commented:
Hi,

Dear,
To bind 'Receiver' field data in grid, you need to include it in select query which as written for binding of gridview

Cheers

Author

Commented:
Thank You.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial