Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
ColumnAutoSizeMode does not work
posted

Hi,

I am resizing all columns of an ultraWinGrid using the following (looping over all columns)

for (int i = 0; i < ClientsView.DisplayLayout.Bands[0].Columns.Count;i++ )
                                              ClientsView.DisplayLayout.Bands[0].Columns[i].PerformAutoResize(Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand);

 I was wondering if there is a better substitute (of looping over all Columns and Bands). I came across the following (in one of Infragistics articles) 

ClientsView.DisplayLayout.Override.AllowColSizing = Infragistics.Win.UltraWinGrid.AllowColSizing.Synchronized;
ClientsView.DisplayLayout.Override.ColumnAutoSizeMode = Infragistics.Win.UltraWinGrid.ColumnAutoSizeMode.VisibleRows;
ClientsView.DisplayLayout.Override.ColumnSizingArea = Infragistics.Win.UltraWinGrid.ColumnSizingArea.EntireColumn;

However, the above approach does not resize any column. Why is that so? What is the difference between the two approaches? 

Any help will be highly appreciated.

Sameer