GridView.ColumnWidthChanged Event

Occurs after a column's width has been changed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DXCategory("Property Changed")]
public event ColumnEventHandler ColumnWidthChanged
<DXCategory("Property Changed")>
Public Event ColumnWidthChanged As ColumnEventHandler

Event Data

The ColumnWidthChanged event's data class is ColumnEventArgs. The following properties provide information specific to this event:

Property Description
Column Gets the column being processed.

Remarks

This event occurs in the following cases:

  • an end-user has dragged a column's right edge, and thus modified its width;
  • a column's width has been modified via the GridColumn.Resize method.
private void gridView1_ColumnWidthChanged(object sender, DevExpress.XtraGrid.Views.Base.ColumnEventArgs e) {
    e.Column.Width = Math.Min(e.Column.Width, colAddress.Width);
}

The ColumnWidthChanged event isn't fired when a column's width is changed via the GridColumn.Width property.

This event also isn't fired when the following conditions are met:

See Also