AllowResizeToFit property is set to false in the Windows Designer code and is never changed. I resize grids all the time in my code and it usually works fine.
It isn''t even resizing to the header size, but smaller, see attached.
It would be great if there were a way to tell the grid to resize by the max of column header or cell data width with properties in the designer instead of having to do this through code.
Any other ideas?
>Hi Todd,
>
>Try setting the AllowResizeToFit property to false . This prevents the GridDataBoundGrid from default resizing (getting adjusted according to Column Header Text).
>
>this.gridDataBoundGrid1.AllowResizeToFit=false;
>this.gridDataBoundGrid1.Model.ColWidths.ResizeToFit(GridRangeInfo.Cols(0, this.gridDataBoundGrid1.Model.ColCount), GridResizeToFitOptions.IncludeHeaders);
>
>Here is a sample.
>
autosizecolumn.zip
>
>Let us know if you need further help.
>
>Best Regards,
>Jeba.
>
grissize_4214.zip