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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Moving columns

Thread ID:





74753 Jun 26,2008 04:40 PM UTC Jun 30,2008 07:18 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On June 26, 2008 04:40 PM UTC


I'm having an issue trying to find which code deals with the moving of columns ...

I'm having a weird issue that if I move any column before column 3 and then try to move it somewhere else I get the following error:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Grid.Grouping.GroupDragHeaderMouseControllerBase.UpdateRedArrowIndicator()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDragHeaderMouseController.MouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTableControlCellRenderer.OnMouseMove(Int32 rowIndex, Int32 colIndex, MouseEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.RaiseMouseMove(Int32 rowIndex, Int32 colIndex, MouseEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridSelectCellsMouseController.MouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlMouseMoveHandled(Object sender, MouseEventArgs e)
at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlHandledMouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.ScrollControl.OnMouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnMouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Note: strangely if I move the original column 3 somewhere else and then move any column before the 'what now becomes the new' column 3 I don't get the issue.

Also somewhere in the code it has been fixed so that columns 1 and 2 can't be moved.

Note: I'm taking over someone else's code hence the question.

Ian S.

Sri Rajan [Syncfusion]
Replied On June 27, 2008 12:31 PM UTC

Hi Ian,

Thank you for your interest in Syncfusion products.

Here is the code and minimal sample to move the columns of the GridGroupingControl programatically.

this.gridGroupingControl1.TableDescriptor.VisibleColumns[1].Name = "Col4";
this.gridGroupingControl1.TableDescriptor.VisibleColumns[4].Name = "Col1";
this.gridGroupingControl1.TableDescriptor.VisibleColumns[2].Name = "Col0";
this.gridGroupingControl1.TableDescriptor.VisibleColumns[0].Name = "Col2";


Please try this and let me know if you are again having the same problem.

Best Regards,

Administrator [Syncfusion]
Replied On June 27, 2008 07:56 PM UTC

Hi there,

I found that this was due to a corrupt grid XML file.

Could you recommend an XML editor that can be used to manually edit the grid generated XML file?

Ian S.

Sri Rajan [Syncfusion]
Replied On June 30, 2008 07:18 AM UTC

Hi Ian,

Thank you for your continued interest in Syncfusion products.

You can use notepad to edit XML files.

Please let me know if you have any further questions.

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.

Please sign in to access our forum

or the page will be automatically redirected to 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