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
1255
Auto size options
posted

I have a grid with

 e.FieldLayout.FieldSettings.AutoSizeOptions = FieldAutoSizeOptions.All;
 e.FieldLayout.FieldSettings.AutoSizeScope = FieldAutoSizeScope.AllRecords;
  e.FieldLayout.FieldSettings.Width = FieldLength.Auto;

I also have some starred columns and I have

AutoFit = false;

AutoFitMode="OnlyWithVisibleStarFields"

All works well except when the grid is shrunk too small.  I want the minwidth of each column to be the FIeldLength.Auto.  I tried setting CellMinWidth and LabelMinWidth to FieldLength.Auto but it wont work.

Is there any way to set the min width of a star auto size column to the field length auto size.

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    No, there is no FieldLength type property for controlling the Min/Max extent of a field. The only option I can think is that you use the CalculateAutoSizeExtent method of the Field to get the autosize value and set that field's CellMinWidth to that. Note, as documented the CalculateAutoSizeExtent method can return Double.NaN when it cannot calculate a value (e.g. if a cell in that field is in edit mode and edit mode ending is cancelled, etc.).

Children
No Data