Hi
i have 3 tables in the DataSet
2 of them has Relations set but the 3rd table is not a child of any of them and therefore does not have relations to any of the other 2 tables.
what i am aiming for, if it is even possible, is to have 3 bands but only 2 of them are Parent Child and the 3rd is seperate band at the Parent level.
i,e,
Parent <-table 0 Child <- table 1-----------------------------------Parent <- table 2 !!!
the Parent of table 2 should always be on the bottom of Parent and Child (tables 0 and 1).meaning when expanding the parent of table 0 and reveling the Childs (table 1) then the Parent (table 2) will slide down.
i added the 3rd table to the DataSet but the Grid did not respond to it. i dont see the data there and when i check Grid.DisplayLayout.Bands.Count it shows only 2. meaning it didn't take the 3rd table at all.
is it even possible to achive? do i need to use RowRegionScroll somehow?
Mike Saltzman"] two 'root' bands have different structure, then you need two child bands under the root. This will be okay, since you can just set it up such that root row 0 only has children from one table and root row 1 only has children from the other table.
two 'root' bands have different structure, then you need two child bands under the root. This will be okay, since you can just set it up such that root row 0 only has children from one table and root row 1 only has children from the other table.
yes this is exactly what i was thinking to do but i created another grid instead not to somewhat overcomplicate things.
thank you Mike for the respone
This can be done, but it's a bit tricky. First, you can't do this in the grid, it has to be done on the Data Source.
Second, the grid data has to be homogenous. So you could have a root band in your grid with two rows.
What you do from there depends on your data. If the two tables you want at the 'root' have the same structure (same fields), then you could just have a single relationship in your data source which creates a child band under the root band and you could set it up so that some of the child rows appear under root row 0 and other appear under root row 1.
If your two 'root' bands have different structure, then you need two child bands under the root. This will be okay, since you can just set it up such that root row 0 only has children from one table and root row 1 only has children from the other table.
Thank you Mike for the information and quick response.
What about having a fake root band and making the current root band (with the 2 tables) as a child band of the fake one, and then adding the 3rd table as the child of the fake root band?
Hi,
The WinGrid only supports a single root band - you cannot have multiple root bands. But it seems like you could easily achieve what you want using two grids.