Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem: Showing data from multiple source-tables in a g
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00920676
Message ID:
00935544
Vues:
56
Mat,

"Doesn't this get back to the original problem of updating multiple tables with a single dataset?"

No, because I don't save that dataset(actually it is just a datatable).

If data comes from 3 tables, I make 3 queries where each query only selects fields from one table each, and databind the textboxes to these datasets.

To display data from all these 3 datasets in the grid, I create a datatable and populate it with the fields I want to show in the grid(using the LoadDataRow-method), and then databind the grid to the datatable.

When the user changes something in a textbox, I update the datatable the grid is bound to. When the user changes something in the grid, I update the datasets the textboxes are bound to(not by saving, but just by copying the data from the datatable to the datasets).

This way I get the read-write grid that I wanted, and I don't have to make an extra SQL-JOIN query and pull data from the database twice.

Kind Regards,
Christian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform