I'm a little confused about relationship between Bands and Rows. Here is what I'm trying to accomplish:
Band A|--Band B| |--Item B1| |--Item B2|--Item A1|--Item A2
I thought I'll just set number of rows in Band A to 3 (Band B + 2 Items) but when I do that I get Band B repeated 3 times. So clearly i don't understand how this stuff supposed to work - can anyone please elucidate me on this subject. What is in the rows collection of a band anyway?
Okay... in this screenshot we have a grid with 3 bands: "Customers Band", "Orders Band", and "Order Details Band".
There's no way to tell for sure, but my guess is that this was done using a DataSet with 3 tables: "Customers", "Orders", and "Order Details". These are common sample tables from the Northwind sample database.
Further, the DataSet defines two relationships. The first is between the Customers and Orders table and is represented here by the "Orders Band". The other is the relationship between Orders and Order Details and is represented in the grid by the "Order Details Band".
Lev said:Is Orders Band a child of a Customers Band?
Yes.
Lev said:What is a Berkeley Gardens (2nd Row in Customers Band). Is it also a band with hidden caption?
This is a row in the "Customers Band".
Lev said:Maybe you can point me to some simple tutorial/help article that explains these relationships
There are all kinds of tutorials in the help.Here's a good starting point: WinGrid
Maybe I'm not explaining my problem well but clearly I don't understand how it supposed to work.
Here is a picture from WindowsFormGridsandPresentation.pdf - I'm trying to accomplish something similar.
Could you explain how data/bands organized in this example?
Is Orders Band a child of a Customers Band? What is a Berkeley Gardens (2nd Row in Customers Band). Is it also a band with hidden caption?
Maybe you can point me to some simple tutorial/help article that explains these relationships
Hi,
What kind of data source are you using for your grid? A band is sort've like a table or a relation in a data source.
In the hierarchy you list here, you have 3 bands: "Band A", "Band B", and then a third band with items in it that you haven't really named.
You can't simply set the number of rows on a band. And a band itself doesn't have a rows collection. It would not make sense, because a band can have rows under multiple parents rows.
The data structure of the grid comes from a data source, anyway, so you need to define the structure and the rows in your data source first.