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 ?
Mike Saltzman"]Are you expecting that setting AutoFitStyle from ExtandLastColumn to ResizeAllColumn will see an immediate change in the grid on the screen? Because I don't think that should be the case.
That's the case. It works perfectly setting AutoFitStyle from ExtandLastColumn to ResizeAllColumn (immediate change in the grid on the screen !!!! ).Also from ExtendLastColumn to None (changes back to previous state).But nothing happens from ResizeAllColumns to ExtandLastColumn or None.
Hi,
I'm afraid I am still not really sure what you mean.
Are you expecting that setting AutoFitStyle from ExtandLastColumn to ResizeAllColumn will see an immediate change in the grid on the screen? Because I don't think that should be the case.
Perhaps you could post a small sample project demonstrating exactly what's happening. Or even some screen shots might help.
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.
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?