Many-to-Many and Parent-Child Datagridview wierdness


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Have you tried setting the FilterLinkOnTable1Filter and FilterTable2OnLinkFilter properties?  You'll want to set the FilterLinkOnTable1Filter to MatchCurrentRow and the FilterTable2OnLinkFilter to MatchVisibleRows.  Since you won't be actually filtering Table1, you might need to either filter it to trigger the cascading of the other filters, or just Navigate(Absolute) to the CurrentRowIndex to get the MatchCurrentRow to trigger.  I can't remember which one fires it for sure.
Pertti Karjalainen
Pertti Karjalainen
StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)StrataFrame Novice (54 reputation)
Group: Forum Members
Posts: 54, Visits: 4K
I have hit a wall, and I would appreciate any help or ideas.

Here's my data setup: TableA  -< TableLink  >-  TableB

I have a Windows maintenance form with business objects for all tables, and separate tabs for TableA and TableB data.

I dropped in the BusinessLayerLinkManager and set up the appropriate properties.

When I run the form, I can see that the many-to-many stuff is working by moving from one record to another and checking out the TableB tab.

So far so good.

Now I added a .NET dataviewgrid to the first page, with the idea that I could edit, add and delete TableB rows from there, as well as see what TableB rows are linked to TableA through the linktable.  I created a businessbindingsource for TableA and made it the grid's data source.

Whew!  However, when I run the form, the grid shows ALL rows for TableB, not the ones linked to TableA.  When I navigate from one TableA row to another, the grid doesn't change (but the TableB tab does!)

So, the question is, do I need to somehow refresh or filter the grid.  I didn't think I needed to, because the many-to-many setup should do the data retrieval from TableB using the LinkTable's foreign key.  I've run this through the debugger and followed the code execution and businessobjects carefully, and it SEEMS to be working fine (e.g., TableB's PK corresponds to LinkTable's FK, as does TableA's0.

Clearly I am missing something here, and it is driving me Crazy

Thanks!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search