AdvBandedGridView.SetColumnPosition(BandedGridColumn, Int32, Int32) Method
Moves a column to the specified position among visible columns belonging to the same band.
Namespace: DevExpress.XtraGrid.Views.BandedGrid
Assembly: DevExpress.XtraGrid.v24.1.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
Declaration
public virtual void SetColumnPosition(
BandedGridColumn column,
int rowIndex,
int colIndex
)
Parameters
Name | Type | Description |
---|---|---|
column | BandedGridColumn | A BandedGridColumn object representing the column to be moved. |
rowIndex | Int32 | An integer value representing the zero-based index of the row where the specified column should be moved. This value is assigned to the column’s BandedGridColumn.RowIndex property. If negative, an exception is raised. |
colIndex | Int32 | An integer value representing the zero-based column index within a band row. This value is assigned to the column’s BandedGridColumn.ColIndex property. If negative, it is set to 0. |
Remarks
Note that the column is moved to a newly created row if the rowIndex parameter exceeds the number of rows. If the colIndex exceeds the number of columns displayed within a row, the column is added to the end of the row’s column collection. If the specified column is hidden (its GridColumn.Visible property is set to false), it is made visible and is moved to the specified position.
Calling this method has no effect if your column has no parent band.