Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data from two tables(1-to-1) into one grid
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00880610
Message ID:
00883265
Vues:
28
Hi Christian,

To get the grid to work with two tables, they would need to be in the same dataset with the relationship set. You would need to copy one of the tables into the other's dataset. Set the relationship in the dataset, then bind the datagrid.

>But then I can only save the data to one of the two tables, correct?
>If I save it to the second table afterwards, the rowstate property has changed, and the data doesn't get saved. (because all the fields are "unchanged")
>Of course I could copy the datatable before saving it, then save the copy to the first table, make a new copy of the datatable and save that to the second table, but that doesn't seem like "the right way to do it". I tried this and it works, but then deleting a record from the grid is still a problem.
>It seems to me that I can't find the proper way to do this.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform