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
Declaration
Parameters
Name | Type | Description |
---|---|---|
newIndex | Int32 | An integer value specifying the target position (a zero-based index within the collection). A negative value to remove the column. |
column | BandedGridColumn | A BandedGridColumn object representing the column to be moved. |
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.