I am new to Infragistics on Windows (Net Advantage 8.3). I am wondering what general tool and options are best to develop a 3-level collapsable grid that looks like below.
Note that the data source is just one table, and this is really a simple grid. The only fancy thing is the collapsable logic in the first column.
I am just looking for orientation, to make sure I don't waste time trying to use the wrong tool, when another tool (or set of options) is much better. The Win Tree might seem appropriate, except that the tree logic just applies to the first column; otherwise all the columns are the same at all the levels. And really I don't literally need a tree, just some equivalent collapsable logic for filtering.
(Sorry that the format is not perfect. I haven't figured out how to set my font-spacing here. All the ABC's should be directly beneath each other.)
Item Number Vendor Qty . . .
- A/1234 ABC 125 - A/1234-010 ABC 40 A/1234-010 U ABC 10 A/1234-010 C ABC 10 A/1234-010 R ABC 20 - A/1234-020 ABC 10 A/1234-020 U ABC 5 A/1234-010 R ABC 5 + A/1234-030 ABC 60 - A/1234-050 ABC 15 A/1234-050 R ABC 10 A/1234-050 T ABC 5+ P/4682 GKLE 63- E/9876 XRA 70 - E/9876 XRA 22. . .
There are about 12 columns, and indefinite number of rows. The main thing is that the first column is in three sections (e.g. A/1234 010 U), or you might call it three columns. I would like to be able to expand/contract the first column like a tree view. But otherwise all the columns are the same for all of the levels; they are just normal columns. A few of them should be updatable, most are read-only. Obviously the first column is read-only.
RobbCol said:Thanks for your helpful information. I am looking at some of these options. I am not sure what you mean by "a DataSet with a single table and a recursive relationship". Does that mean a DataSet with two or three DataTables that have the same underlying Table that self-joins? Or can you make a "recursive relationship" on one DataTable?
You would use a DataSet with one or more tables. In your case, you only have one table, so your DataSet would have a Relationship where both columns are in the same table. So, for example, let's say you have a table of Employees. Each Employee has an ID. Each Employee also has a Supervisor ID which the ID of the employee that he reports to. You would use a Single DataTable in the DataSet and then add a Relationship such that the EmployeeID is linked to the Supervisor ID.
RobbCol said:I have a question about Bands. If I make three DataTables for the three levels, then it seems I need three Bands with separate column definitions for each band. And then the column headers keep on repeating for each of the lower bands. But I really only want one set of columns (and column headers) that show at the top of the grid; the three levels all have the same columns. Is there any way to do this?
You can use ColHeadersVisible on the Band to hide the headers for the child bands. You can also use the HeaderPlacement property to eliminate repeating headers, it you like.
Mike,
Thanks for your helpful information. I am looking at some of these options. I am not sure what you mean by "a DataSet with a single table and a recursive relationship". Does that mean a DataSet with two or three DataTables that have the same underlying Table that self-joins? Or can you make a "recursive relationship" on one DataTable?
I have a question about Bands. If I make three DataTables for the three levels, then it seems I need three Bands with separate column definitions for each band. And then the column headers keep on repeating for each of the lower bands. But I really only want one set of columns (and column headers) that show at the top of the grid; the three levels all have the same columns. Is there any way to do this?
If all of the data is in a single table, then there are a couple of ways you could go.
The first way would be to use OutlookGroupBy. You would simply bind the grid to the data table containing all of the data and then set the grid.DisplayLayout.ViewStyleBand to OutlookGroupBy and drag the columns you want to group by into the GroupByBox at the top of the grid. Or, you could group the columns in code using the band's SortedColumns.Add method.
The other way to do it would be to set up a DataSet with a single table and a recursive relationship.