Hello,
I've attached a sample solution in which i have a ultragrid linked to a dataset.
Dataset has 3 tables, "One", "Two" and "Three". "Two" and "Three" being child of "One" and sibling of each other.
On the click of the button "Replace Band Three", I remove table "Three" from the dataset and add another table "Three" with a different structure.
How can this change be reflected into the grid, can I reload the display layout of a band ?
TIA,
Guillaume.
If you consider the object model the grid is sitting there and hasn't realized that its underlying data source has been modified. I looked around and didn't see any methods that suggested something that would refresh a specific band or anything of that nature. I would bet that if you were to set the grid's data source equal to your data source object again in your button click event that the grid would reorganize itself to match the new table structure.
If re-setting the DataSource is the only way, i will have to use that way.
However, I have problem making it work.
Setting again the DataSource to the dataset does not work.
Setting the DataSource to null, then to the dataset, show new band but it has no columns (I see only row markers).
Setting the DataSource to a copy of the dataset works ok. However, I don't want the overhead of creating a copy of the dataset.
This seems like an odd behavior. What are you actually trying to do by switching bands around?
Please see this post http://forums.infragistics.com/forums/p/27022/99450.aspx#99450As I say in this post, I have 3 levels of data to display, where level2 rows must be displayed horizontally.Let say that:level1 shows the Production Lineslevel2 shows the Marks of the Production Linelevel3 shows the Details of the MarkSo, under a "Production Line" row, i have to display each "Marks" horizontally, and for each "Marks" i have to display its "Details" rows vertically.The only way I've found to do this is that each "Production Line" rows have a different child datatable created at runtime. This datatable contains a "set of columns" for each "Mark" rows (the column name contains the Mark ID) , and "Detail" rows are "merged" into this child datatable into the corresponding set of columns for the Mark.I've managed to fill the grid like this at initial load.Now I have to allow the user to insert and remove "Mark" from a "Production Line", which mean I have to add/remove columns in the child datatable.
So would I be correct to say there is a one to many relationship between "Production Lines" and "Production Line Marks" (which is the table that relates production lines and marks) and there is a the third table that contains the Mark detail?
"Production Line" has one to many "Mark".
"Mark" has one to many "Detail".
I've attached another sample project, which contains 2 grids, the first one showing the data in a standard way, and on click of the "Translate into" button, the data of the first grid is translated into the second grid in the way i need.