General information
Category:
The Mere Mortals .NET Framework
Title:
Re: data binding for foreign key values
Hello,
Using mmGridView in ASP.NET 2.0 for the first time and am interested in showing lookup data for foreign key fields within the mmGridView. So far I've not been able to set up databinding correctly.
I'm using strongly taped DataSets. Tables structure of the main table is something like:
iEventID (PK)
cCity
dStartDate
dEndDate
iVenueID (FK)
...etc
Related Table (example):
iVenueID (PK)
cVenueName
etc...
The event table is set up with a business object that is registered on the aspx page. A test page with mmGridView on it is running fine and displays values correctly, but I'd like to display the Venue name rather than the foreign key value.
I'm new (just purchased today) to MM, as well as trying to work with ASP.NET 2.0 functionality for the first time. Have been through the Jump Starts but am clearly still missing some of the basics.
Do I need to a) establish a relation between the Event and Venue tables within the strongly typed DataSet so that I can bind some meaningful display values to the control for the foreign key values, b) create a separate business object for the foreign key table and then somehow bind the control in the mmGridView to this object, or c) ???
Thanks in advance for your patience and any suggestions....
Mark Dowlearn
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only