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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl column Dragging

Thread ID:





26129 Mar 15,2005 01:31 PM UTC Mar 16,2005 11:37 AM UTC WinForms 2
Tags: GridControl
Asked On March 15, 2005 01:31 PM UTC

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

Administrator [Syncfusion]
Replied On 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

Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon