Skip to main content
A newer version of this page is available. .

ColumnView.ColumnPositionChanged Event

Allows you to respond to changing a column’s position within the View.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

[DXCategory("Property Changed")]
public event EventHandler ColumnPositionChanged

Event Data

The ColumnPositionChanged event's data class is EventArgs.

Remarks

The column whose position has been changed is specified by the event’s sender parameter. To get the column’s position among visible columns in the Column Header Panel, use the GridColumn.VisibleIndex property.

The ColumnPositionChanged event also fires in the following cases:

using DevExpress.XtraGrid.Columns;

private void gridView1_ColumnPositionChanged(object sender, EventArgs e) {
    GridColumn column = sender as GridColumn;
    MessageBox.Show(column.VisibleIndex.ToString());
}

To identify the column’s position within the group panel, use the GridColumn.GroupIndex property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColumnPositionChanged event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also