|
|
 |
BOOK: Beginning ASP.NET 2.0 and Databases  | This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 and Databases by John Kauffman, Bradley Millington; ISBN: 9780471781349 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 2.0 and Databases section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

April 26th, 2009, 04:57 PM
|
|
Authorized User
|
|
Join Date: Apr 2008
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
GridView With ObjectDataSource
Hi,
I have a GridView that uses an ObjectDataSource. The objects being displayed are Inquiry objects. In the Inquiry object I have a reference to a Person object. In the Person class I have two properties of interest; FirstName and LastName.
When configuring the GridView the reference to the Person object is visible in the list properties, however the properties in the Person object are not. That is because the object linked to by the datasource is the Inquiry object not the Person object.
So in order to display in the GridView the first and last names of the person who submitted the inuiry I am thinking of adding two properties to the Inquiry object; FirstName and LastName. I do not intend to duplicate the data in the Inquiry object, but rather have the two properties in the Inquiry object pull the first name and last name from the Person object referenced in the Inquiry object.
Is this the proper way to do this in an OO fashion or am I missing something?
Thanks in advance for any help.
|

April 26th, 2009, 11:35 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 211
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
GridView With ObjectDataSource
AspNetGuy:
I think you are on the right track. Verifiy in your Datasource, which is or should be relational especially if you are using a related table as in your Inquiry Object (table) using the PersonObject Primary Key (PersonID) in order to displary the information from the Person table. Verify the relationship(s) among your Table Objects as in an E-R Diagram based on the DataSource.
Hope This Helps.
__________________
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
|

April 27th, 2009, 12:52 AM
|
|
Authorized User
|
|
Join Date: Apr 2008
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks For Your Input
Thanks for your input.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |