GridControl column Dragging

Hi, I would like to be able to move a column in a GridControl by directly dragging it to the wanted location. I do not want to have to click (to select the column) and then drag it. Right now I have : private void gridControl_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e) { GridControl gridControl = sender as GridControl; if ( null != gridControl && null != e && 0 == e.RowIndex && MouseButtons.Left == e.MouseEventArgs.Button ) { gridControl.Selections.Clear(); gridControl.Selections.Add(GridRangeInfo.Col(e.ColIndex)); } } private void gridControl_CurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e) { GridControl grid = sender as GridControl; if ( null != grid && null != e) { if ( 0 != e.RowIndex ) { e.ColIndex = 0; } } } I wanted to use CellMouseDown event, but it seems that is not fired (is it because my cells are not editable?). Ams

2 Replies

AD Administrator Syncfusion Team March 15, 2005 01:49 PM UTC

Here is a forum thread with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9676


MO mowmow March 16, 2005 11:37 AM UTC

Perfect! Thanks >Here is a forum thread with a sample. > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9676

Loader.
Up arrow icon