1. Normally, all you need to do is to set properties to allow the user to select columns (AllowSelections property) and to allow the user to drag columns (AllowDragSelectedColumns property). But if you have set ListBoxSelectionMode to be anything other than None, this precludes selecting columns an dthus breaks moving columns.
There are a couple of ways around this. If you are using SelectionMode.One, then you can use teh technique shouwn in the Grid\Samples\Quick Start\HighlightCurrentRow sample to highlight the row instead of setting the SelectionMode.One property value. This would allow you to set the other properties that would enable your user to move columns.
Another work around that should work with any ListBoxSelectionMode setting is to also handle the CellClick. In the handler explicitly select the column if you click a header.
private void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
//use this code to try to handle column selections with ListBoxSelectionMode set
if(e.ColIndex > 0 && e.RowIndex == 0)
{
this.gridControl1.Selections.Add(GridRangeInfo.Col(e.ColIndex));
}
}
2. Try setting
grid.ActivateCurrentCellBehavior = GridCellActivateAction.None;
If you do not want the clicked cell to look differently, try also setting
grid.TableStyle.Enabled = false;
3. In the grid''s ControllerOptions property, turn off the OleDataSource flag.