Simple DataRelation not working between 2 DataGridViews - Help - 04-27-2006 , 12:14 AM
I even started off with a new project and a blank form. In design
view I created a DataSet, 2 tables within the DataSet, 2
TableAdapters, and 2 BindingSources. One tableadapter and one
BindingSource for each table. The tables have the following key
What I want to do is to scroll thru the items in Table1 and as a row
is selected to show only those rows in Table 2 with a matching
category (t1Cat = t2Cat).
Each row in Table1 has a t1Cat, there may be up to 50 or so Table2
matching Cat's. (We will manually be assigning sub-cats with this
In design view, I added a relation "PartsCats", parent key = t1Cat,
child key= t2Cat.
When I run the program, both DataGridViews get loaded and visible, but
no filtering of categories occurs in Table2. What am I missing?
I've seen some examples, but I can't see what I'm not doing. A little
Re: Simple DataRelation not working between 2 DataGridViews - Help - 04-28-2006 , 10:10 AM
binding1.DataMember = "table1"
binding1.DataSource = dataSet1
grd1.DataSource = binding1
binding2.DataMember = "PartsCats"
binding2.DataSource = binding1
grd2.DataSource = binding2
*** Sent via Developersdex http://www.developersdex.com ***
Re: Simple DataRelation not working between 2 DataGridViews - Help - 04-28-2006 , 11:07 PM
Finally got it working thanks to you. I've been reading MS ADO.NET
2.0 Step by Step, the 2005 edition. Can't see where it talks about
setting up the databindings like you've shown here. Guess I'll have
to get an additional book. Do you have any recommendations?
On Fri, 28 Apr 2006 08:10:15 -0700, RCD <nospam (AT) devdex (DOT) com> wrote:
|Thread Tools||Search this Thread|