I have the following code to remove a column:
ultraDataSource1.Band.Columns.Remove(colKey); UltraDataBand band = ultraDataSource1.Band; while (band.ChildBands.Count > 0) { band = band.ChildBands[0]; band.Columns.Remove(colKey); }
Removing the column from the final band takes a long time. My data is setup as follows:The initial band contains about 30 rows of data, and each of those contains about 30 rows in their child band. Then each of those child rows has one or two rows in the band below it.
Is there a way to speed up removal of a column?
Thanks.
-Nick
That seems like it will clear all the columns. What if I want to remove just one column?
Hi Nick,
I'm not sure why the last column would take any longer than the first one. But this seems very inefficient to me, anyway. Why remove each column indivudually? If you do it this way, then the UltraDataSource is going to send a notification to every bound control upon the removal of each column. So the controls are going to update themselves multiple times. It would probably be a lot faster and more efficient to call band.Colmuns.Clear() or maybe band.Reset().