Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding the PK of the main table in a multitable view
Message
De
20/12/2007 05:42:54
John Thomason
King Richard Veterinary Centre
Leicester, Royaume Uni
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01276165
Message ID:
01276770
Vues:
23
>John,
>
>>The table's PK is included in the view. I need to retrieve the PK when clicking on a record in the view so that I can synchronize the view with the primary table. If I use a datagridview for navigation which is populated by the primary table I get a list of memberids rather than names so I'm unable to make a choice for deletion for instance. I hope that makes more sense.
>
>Sorry for being dense on this one, but maybe you can provide more detail so I can understand the scenario. Are you working with multiple grids? If so, what are you data binding them to? What synchronization are you trying to perform?
>

Its a very simple scenario - the primary table is meetingattendance, members and meetings are lookup tables. There are 2 comboboxes to input the information. The members combo bindingsource = members table, bindingsourcedisplaymember = members.surname, bindingsourcevaluemember = members.memberid and the bindingvaluesourcemember = meetingattendance.memberid.
When a record is saved, the view in the only dataviewgrid on the form is refreshed to display the full details ie the members surname and not the memberid.
I want to sychronize the records in the view to the meetingattendance table so that if I need to delete a record I just select a record in the dataviewgrid and then click the delete button.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform