is it possible to bind a nested property to a GridView column?

N

Neil Chambers

I have an object which references another object (courtesy of LINQ) and I
would like to use a property from the referenced object in a grid view.
However, my feeble attempt at doing this does not work

//field is retrived as expected
<asp:BoundField DataField="name" HeaderText="name" />

//GridView complains that property cannot be found
<asp:BoundField DataField="address.street" HeaderText="street" />

Am I barking up the wrong tree?

Cheers,
n
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top