p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: Beginning ASP.NET 2.0 and Databases
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2009, 04:57 PM
Authorized User
Points: 117, Level: 2
Points: 117, Level: 2 Points: 117, Level: 2 Points: 117, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2008
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old April 26th, 2009, 11:35 PM
Friend of Wrox
Points: 741, Level: 10
Points: 741, Level: 10 Points: 741, Level: 10 Points: 741, Level: 10
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 211
Thanks: 1
Thanked 7 Times in 7 Posts
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old April 27th, 2009, 12:52 AM
Authorized User
Points: 117, Level: 2
Points: 117, Level: 2 Points: 117, Level: 2 Points: 117, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2008
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy
Default Thanks For Your Input

Thanks for your input.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding GridView to ObjectDataSource which... rsearing ASP.NET 2.0 Professional 15 July 9th, 2008 02:44 AM
ObjectDataSource in UserControl Colonel Angus .NET Framework 2.0 0 April 3rd, 2008 11:14 AM
CH5 ObjectDataSource nabeelalkaff BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 March 8th, 2007 01:19 PM
Chapter5 ObjectDataSource nabeelalkaff BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 5th, 2007 01:15 AM
Problem with ObjectDataSource... veeruu ASP.NET 2.0 Professional 0 March 2nd, 2007 07:45 AM



All times are GMT -4. The time now is 03:14 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc