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.
Could you elaborate or provide an example ?
I am not sure I understand.
Would it help if you added data column expression fields to bring the mark detail fields into the production line marks datatable using a data relation?
I did some performance test with 20 top rows, each one with a different child band (which means a total of 21 bands). Each top rows child band had about 20 Marks, which means 80 columns in the band(I have 4 columns of Detail rows to display), and about 10 rows of Detail for each Mark. This represent the maximum data the application will have to handle. The performance was good.It is true that i'm trying to get the grid to display non-homogenous data under each top rows.But really, my data IS homogenous, I use this approach (I know it's horrible) only because the grid doesn't allow me to display Mark rows horizontally(on the right of each other) and then display the Detail under it.What could work I think is to make Mark band as a CardView, but then I would need each cardview to be able to display child rows inside/under it, which the grid doesn't allow.I would be really happy to know if another Infragistics control would be better than the ultraGrid to display the data in this way. I never used the WinTree. Would it allow me to do this kind of data display more easily ?
Have you done any testing of this with large sets of data? Is your real application going to need to handle more than a few rows?
Because if so, I don't think this approach is going to work. Maybe I am wrong, but it sounds like you are trying to get the grid to display non-homogenous data by creating a new child band for each parent row. That means that every parent row will have a number of child bands equal to the total number of parent rows. I assume that most of the parent rows will only have child rows in a single child table.
Is that what you are you trying to do? If so, then I think you are probably going to run into some serious performance issues once you get more than a few rows of data. If you have 100 parent rows, that means 100 child bands under EACH parent row. Even though 99 of them won't have any data, they will still exist and I would be surprised if that didn't cause the BindingManager in DotNet to slow down considerably.
I could be wrong, it might be worth testing it out.
If you need to display Non-Homogenous data, then the grid is really not designed for that and you may want to consider using WinTree instead. But the tree does not have summaries or filtering functionality so it's something of a trade-off.
Having said all that, the small sample you posted here should work. I don't know why the grid is not picking up the new band. It seems like the grid is removing the original band "Three", and it even seems to be recognizing the new band and the new rows, but for some reason, it's not picking up the columns for the band correctly.
You really shouldn't have to do anything to get this to work. In rare cases, you might need to call:
this.ultraGrid1.Rows.Refresh(Infragistics.Win.UltraWinGrid.RefreshRow.ReloadData, true);
But that only applies if the data source is not sending notifications to the grid, and in this case it clearly is sending the notifications because it's a DataSet.
So this looks like a bug to me. I'm going to forward this thread over to Infragistics Developer Support so they can check it out.
"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.