Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Re: data binding for foreign key values
Versions des environnements
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement