We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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 08:49 AM

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


MO mowmow March 16, 2005 06:37 AM

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

Loader.
Live Chat Icon For mobile
Up arrow icon