Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
data binding for foreign key values
Message
De
21/03/2006 23:28:17
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01106119
Message ID:
01106486
Vues:
33
Hello, Kevin -

Thanks. I guess that's true for simply displaying the value. I should have been more specific and indicated that I am also wanting to populate a dropdownlist with a list of venues when in the gridview's edit mode, at which point I am assuming I would need a business object or some other object for the related table. Any suggestions along these lines?

In researching the forum earlier, I did see a recommendation you made for an ADO.NET book a while back (to a somewhat similar inquiry) which perhaps discussses this. In researching it, though, and it looks the .NET 2.0 version of the book won't be out until July .... I've got some other reference material on the way, but I'm still trying to figure this out in the near term, and unless I'm just looking in all the wrong places, there doesn't seem to be much information related to this kind of thing on the web. In the meantime, I'll keep looking.

Thanks for your assistance (and apologies again for the errant email earlier this morning!),

Mark

>>>>>>>>>>>>>>

>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) ???

The easiest approach is to include the venue name in your SQL SELECT statement or stored procedure.

Best Regards,
Kevin McNeish
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform