GridView / Binding Sub Properties

G

Guest

Lets say you have a business object called Person which derives it's data
from the Person table therefore it has all sorts of properties such as
FirstName, LastName, Age, etc.

In addition you have an Address table that holds addresses and is related to
the Person table as well as other tables. (same address may be related to
other business objects such as BusinessContacts, etc.)

The Person object also has a property called MailingAddress which is of type
AddressInfo (contains the address information in the Address table).

Now lets say I have a GridView control and I want a list of Person objects
to be shown. I want a column for FirstName, LastName, Age, etc. That's easy.
However, I also want a column called Street, City, State, and Zip but all
those are properties of the AddressInfo object. How do I bind those
"sub-properties" also?

I seem to remember having read somewhere that this was a problem in ASPNet
1.x but would be handled and solved in 2.0.
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top