I created a menu option to set the AutoFitStyle on my grid.
From default (AutoFitStyle.None) to AutoFitStyle.ResizeAllColumns and to AutoFitStyle.ExtendLastColumn works fine.
From AutoFitStyle.ExtendLastColumn back to AutoFitStyle.None works fine also.
But AutoFitStyle.ResizeAllColumns back to AutoFitStyle.None or AutoFitStyle.ExtendLastColumn doesn't work. It remains on AutoFitStyle.ResizeAllColumns.
I tried: this.ultraGrid.Selected.Rows.Clear();and this.ultraGrid.Refresh();before changing the AutoFitStyle but nothing seems to work.
What am I doing wrong ?
Hi Robert,
Are you sure the property is actually being set?
When you say it stays on ResizeAllColumns, does that mean that the column sizes don't immediately change? Or that even when you resize the grid, all of the columns resize?
Mike Saltzman"]Are you sure the property is actually being set?
I thinks So. I use this to set the property: this.ultraGrid.DisplayLayout.AutoFitStyle = AutoFitStyle.None;As indicated, sometimes works fine, but not after ResizeAllColumns.
Mike Saltzman"]When you say it stays on ResizeAllColumns, does that mean that the column sizes don't immediately change? Or that even when you resize the grid, all of the columns resize?
When it works the columns immediately changes. In other cases nothing happens.
When i change the columns manualy (using the right borders),then using the menu to ExtendLastColumn and/or back to None, it works fine. (immediately changes)When i use ResizeAllColumns, immediately all columns change, but they can't change back to ExtendLastColumn or None.
I hope it's a little bit clear.