DataViewBase.MoveColumnTo(ColumnBase, Int32, HeaderPresenterType, HeaderPresenterType) Method
Moves the specified column to the specified position.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v14.2.Core.dll
#Declaration
public void MoveColumnTo(
ColumnBase source,
int newVisibleIndex,
HeaderPresenterType moveFrom,
HeaderPresenterType moveTo
)
#Parameters
Name | Type | Description |
---|---|---|
source | Column |
A Column |
new |
Int32 | An integer value that specifies the column's new position among the columns displayed within the destination area. |
move |
Header |
A Header |
move |
Header |
A Header |
#Remarks
The following example shows how to group data by the 'Unit Price' column values using the MoveColumnTo method.
grid.View.MoveColumnTo(grid.Columns["UnitPrice"], 0,
DevExpress.Xpf.Grid.HeaderPresenterType.Headers,
DevExpress.Xpf.Grid.HeaderPresenterType.GroupPanel);