Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Master/Child DataGrids... HELP! :)
Message
De
25/04/2004 02:03:48
 
 
À
25/04/2004 01:55:09
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00897937
Message ID:
00897971
Vues:
23
Yep, works like a champ. When you click on any field in a row in th parent DataGrid, the child DataGrid instantly changes to show that rows child records. When you call SetDataBinding() on the parent datagrid, you give it the dataset and the name of the parent table in the dataset. When you call SetDataBinding() on the child datagrid, you give it the dataset and the name of the relation ("ParentTable.RelationName"). I had never used it before either, but that's how this code was doing it when I inherited it.

BTW, that code I showed you, it's all changed. I stuck in a temporary line to write out the XML Schema after it selected the parent and child tables into the dataset and created the relation. Then I made a typed dataset from the schema and I'm using that through the whole program. Made creating a Crystal Report much easier. I give the report viewer the same dataset that's bound to the datagrids. :)

-----
Lee

>Lee,
>
>Glad to hear that worked...always glad to help a fellow Virginian (I was born in Alexandria) ;)
>
>Thanks for the return web site...I have a huge folder of .NET sites, so I'll add that to my collection.
>
>Just out of curiosity, assuming you're still using setbinding(), when you bounce around on the top grid, does the bottom grid refresh properly?
>
>I couldn't get it to work until I used datasource and datamember (which I would have thought amounted to the same thing), but maybe I was typing in something wrong.
>
>Kevin
-----
Lee Perkins
TigerBase Technologies

"Lee is one that would plug his brain into the internet, if he could, and STILL scream for more" - Very good friend of Lee's
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform