Skip to main content

GridView.ColumnWidthChanged Event

Occurs after a column’s width has been changed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v22.2.dll

NuGet Package: DevExpress.Win.Grid

Declaration

[DXCategory("Property Changed")]
public event ColumnEventHandler ColumnWidthChanged

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