Hello!
i have a grid with 3500Rows!
calling this method -> band.Columns[0].PerformAutoResize(PerformAutoSizeType.AllRowsInBand);
it takes 19-20 seconds to resize all columns. Am i doing something wrong or with this quantity of rows the grid is not so performant?
thank you
Calling PerformAutoResize with AllRowsInBand forces the grid to load all of the data rows from the data source. While this might cause a small performance hit, 19-20 seconds seems quite excessive for 3500 rows.
What's the data type of the column?
Is there anything unusual about this column? Are you setting an Editor or EditorControl on it? Or maybe a ValueList?
Try turning on exception handling in Visual Studio and see if any exceptions are being raised and caught during the PerformAutoResize call.
We have the same problem with PerformAutoResize and in certain places we have refused to use it.
I think infra team would analyse the way that PerformAutoResize works.
Thanks Mike..!
Hi Sonali,
If this method isn't working, then my guess is that you are calling it at the wrong time. Perhaps you are calling this before there are any rows or columns in the combo.
Hello Mike,
I am using UltraCombo in my application. I am trying to set PerformAutoSizeType property to ultracombo. But it is not increasing the size of columns when I load the ultracombo.
code I am using is
ultracombo.DisplayLayout.Bands(0).PerformAutoResizeColumns(False, PerformAutoSizeType.AllRowsInBand)
Please let me know where I am doing wrong. Or do I need to do any other property value
Sonali
thank you Mike.
walterG said:I believe the performance problems are caused because of the number of columns on the grid. Currently my grid have about 70 clumns, but only 15 are visible.Now the solution is to use ultraGrid1.DisplayLayout.Bands[0].PerformAutoResizeColumns(FALSE, PerformAutoSizeType.AllRowsInBand);and it takes less than 1 sec :) instead using ultraGrid1.DisplayLayout.Bands[0].PerformAutoResizeColumns(TRUE, PerformAutoSizeType.AllRowsInBand);it takesthe same time as band.Columns[0].PerformAutoResize(PerformAutoSizeType.AllRowsInBand);
I believe the performance problems are caused because of the number of columns on the grid. Currently my grid have about 70 clumns, but only 15 are visible.
Now the solution is to use ultraGrid1.DisplayLayout.Bands[0].PerformAutoResizeColumns(FALSE, PerformAutoSizeType.AllRowsInBand);
and it takes less than 1 sec :) instead using
ultraGrid1.DisplayLayout.Bands[0].PerformAutoResizeColumns(TRUE, PerformAutoSizeType.AllRowsInBand);it takesthe same time as
band.Columns[0].PerformAutoResize(PerformAutoSizeType.AllRowsInBand);
Okay. Your original post showed you calling PerformAutoResize on a single column. Now you seem to be calling it on the band, which applies to all columns. So that makes a lot more sense.
walterG said:Why the grid has to load all of the data rows from the data source when calling performautoresize with AllRowsInBand?
The grid needs to load the text of the cell in order to size the column to it, of course.
walterG said:"Try turning on exception handling in Visual Studio"?
I meant going into the Debug menu and setting the visual studio IDE to break on all exception. You should refer to the visual studio documentation on this.