GridBandColumnCollection.MoveTo(Int32, BandedGridColumn) Method
Moves a column to a new position within the current band.
Namespace: DevExpress.XtraGrid.Views.BandedGrid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
public virtual void MoveTo(
int newIndex,
BandedGridColumn column
)
#Parameters
Name | Type | Description |
---|---|---|
new |
Int32 | An integer value specifying the target position (a zero-based index within the collection). A negative value to remove the column. |
column | Banded |
A Banded |
#Remarks
If the newIndex parameter exceeds the number of elements in the collection, the column is moved to the end of the collection.
Calling the MoveTo method does nothing if the column doesn’t belong to the collection.
When you move a column forward (i.e., when the newIndex is higher than the current index), the column is actually moved to the position specified by the newIndex - 1 value. When you move a column backward, the column is moved to the position specified by the newIndex value.