Hi,
I am using infragestic grid ( 9.2 version). I m facing problem while resizing columns. I have write following code in grid InitializeLayout.
if (Common.FitToContentGrid) // if user want to view grid apperance as fit to content{this.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.None; this.DisplayLayout.Override.AllowColSizing = Infragistics.Win.UltraWinGrid.AllowColSizing.Free;this.DisplayLayout.PerformAutoResizeColumns(false, PerformAutoSizeType.AllRowsInBand,true);this.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.ExtendLastColumn;
// if user want to view grid apperance as fit to gridelse{ this.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.None; this.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.ResizeAllColumns; }
but this code doesnot work for some grids and works fine for some grids.
can someone guid me , wheather i m doing any wrong code ?
What exactly is not working? I don't know what your question is.