Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Master/Child DataGrids... HELP! :)
Message
From
25/04/2004 00:29:14
 
 
To
24/04/2004 23:43:10
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00897937
Message ID:
00897967
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform