Back to Devexpress

GridColumn.GetBestWidth() Method

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-gridcolumn-bd14ea1b.md

latest2.0 KB
Original Source

GridColumn.GetBestWidth() Method

Returns the minimum width that the column can have and still display its contents completely.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public int GetBestWidth()
vb
Public Function GetBestWidth As Integer

Returns

TypeDescription
Int32

An integer value that specifies the column’s minimum width which is required to display its contents completely.

|

Remarks

If the GridColumn.OptionsColumn.FixedWidth option is set to true , the GetBestWidth method returns the GridColumn.Width property value.

See Also

CalcColumnBestWidth(GridColumn)

BestFit()

BestFitColumns

BestFitMaxRowCount

GetHeaderBestWidth()

GridColumn Class

GridColumn Members

DevExpress.XtraGrid.Columns Namespace