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

column should reset always at last position, what ever the last position at run time

Thread ID:





60480 May 6,2007 09:19 AM May 7,2007 12:01 PM Windows Forms 1
Tags: GridControl
Asked On May 6, 2007 09:19 AM

Hi i want Auto hide and unhide feature,i am using
Syncfusion.Grid.Grouping.Windows, by property of
and Syncfusion.Grid.Grouping.Windows.move(1,0)


i have grid with full data, end user drag column from (3 to 2 position), so how i can trace this column at dragging time,and if unhide then column should go to 2 nd position not 3 rd position.

if i use Syncfusion.Grid.Grouping.Windows.visiblecolumn, so by this i can see position where i bind grid, means i can get 3 rd position.

Means : column should reset always at last position

haneefm [Syncfusion]
Replied On May 7, 2007 12:01 PM


You can handle the TableControlQueryAllowDragColumn event and get dragging column name and position. Below is a code snippet. If you want to reinsert the particular column then use the TableDescriptor.VisibleColumns collection in a Grid. Here is a code snippet.


this.gridGroupingControl1.TableControlQueryAllowDragColumn +=new GridQueryAllowDragColumnEventHandler(gridGroupingControl1_TableControlQueryAllowDragColumn);

private void gridGroupingControl1_TableControlQueryAllowDragColumn(object sender, GridQueryAllowDragColumnEventArgs e)
if( e.Reason == GridQueryAllowDragColumnReason.MouseUp)
e.AllowDrag = false;
Console.WriteLine(e.InsertBeforeColumn +":::" + e.Column );

Here is a forum thread that discuss with the last column dragging ina grid.

Best regards,


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.

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.