GridView.CanResizeColumn(GridColumn) Method

Indicates whether the specified column's settings allow end-users to resize the column.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public override bool CanResizeColumn(
    GridColumn column
)
Public Overrides Function CanResizeColumn(
    column As GridColumn
) As Boolean

Parameters

Name Type Description
column GridColumn

A GridColumn object (or descendant) representing the tested column.

Returns

Type Description
Boolean

true if end-users can resize the specified column; otherwise, false.

Remarks

This member supports the grid control's internal infrastructure and is not intended to be used in your code.

The CanResizeColumn method returns its value with respect to the specified column's OptionsColumn.AllowSize option state. Views use this method for the following purposes:

  • To determine whether the cursor changes its appearance when the mouse pointer is over the right column header's edge. This also specifies whether end-users can resize columns by dragging their right edges.
  • To determine whether the Best Fit item of the column header context menu should be enabled.

Important note: the actual column resizing availability may not match the method's return value. For instance, the last visible column cannot be resized when the columns auto width feature is applied (the View's GridOptionsView.ColumnAutoWidth option is enabled). A mismatch can also occur when you override the default View behavior via code.

See Also