autofit column on griddataboundgrid

hi all...
how to fit column width automaticcally?
i'm using griddataboundgrid...



1 Reply

AD Administrator Syncfusion Team February 22, 2008 11:10 PM UTC

Hi Sherly,

Thank you for using Syncfusion product.

You can try setting the

this.gridDataBoundGrid1.AllowResizeToFit = true;

It should automatically resize columns to fit cell contents on first display of the data.

If you want to manually resize a range of columns to optimally fit contents of the specified cells in a grid, you need to call the ResizeToFit method.

this.gridDataBoundGrid1.Model.ColWidths.ResizeToFit(GridRangeInfo.Table());

Best regards,
Haneef


Loader.
Up arrow icon