Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Master/Child DataGrids... HELP! :)
Message
De
25/04/2004 00:29:14
 
 
À
24/04/2004 23:43:10
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00897937
Message ID:
00897967
Vues:
17
This message has been marked as the solution to the initial question of the thread.
Lee,

Here's what I did to make it work (I use C# and not VB.NET, though this should be pretty easy to convert...

DsTest.Relations.Add("TableRelation", DsTest.Tables["Table1"].Columns ["ssn"], DsTest.Tables["Table2"].Columns["ssn"]); // similar to what you had

dataGrid1.DataSource = DsTest.Tables[0]; // I don't use setdatabinding
dataGrid1.AllowNavigation = false; // should fix the navigation issue

dataGrid2.DataSource = DsTest.Tables[0];
dataGrid2.DataMember = "TableRelation";

(Because I had to create some data, I just created two simple datatables, related by SSN).

I could not get SetDataBinding to work on the 2nd grid...the relation wouldn't refresh correctly. Not sure why, but when I switched to datasource and datamember, it worked fine.

The 'allownavigation' should take care of the navigation issue on the top grid.

Also....here's a site that might be helpful for you...this one has saved my bacon a million times...

http://www.syncfusion.com/FAQ/WinForms

There is a ton of sample code up there.

Hope this helps!
Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform