-
Apr 18th, 2013, 07:26 PM
#1
Typed Dataset and Bound Controls
I have a typed data that I've created that links the table 'Contacts' to the table 'Clubs' via a table called 'ClubContacts' - e.g. there's a relation between 'Contacts' & 'ClubContacts', and a relation between 'Clubs' & 'ClubContacts'
On my form there is a bound grid for the 'Clubs' table and a bound grid for the 'Contacts' table. What I want is for the contents of the 'Contacts' grid to update dependent on the current record in the 'Clubs' grid. I figure there must be a way to get the dataset to drive this behaviour, but I can't work it out.
-
Apr 18th, 2013, 07:45 PM
#2
Re: Typed Dataset and Bound Controls
Follow the CodeBank link in my signature and check out my thread on Master/Detail Data-binding. I've never tried to do it with a join table like that but it may be possible. You'd have to use three BindingSources with just two of them bound to your grids.
-
Apr 19th, 2013, 06:34 AM
#3
Re: Typed Dataset and Bound Controls
Cheers jmcilhinney, that's definitely put me a step in the right direction, and after tweaking my relationships in the dataset designer, I've got my three BindingSources connected to each other.
However, the resulting behaviour isn't quite what I was aiming for. The last BindingSource only shows data related to the selected record in the middle BindingSource, rather than all the records (which makes sense, because that's the desired behaviour between the first and middle BindingSources).
Can that be altered?
Or am I just better off building a view into my dataset that already does the join between two of the tables?
-
Apr 19th, 2013, 08:04 AM
#4
Re: Typed Dataset and Bound Controls
I was not certain that the three BindingSources would work and it appears that perhaps it won't. You may need to add some manual filtering.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|