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.

Disallow 1 column to Drag

Thread ID:





42159 Mar 21,2006 11:02 AM Mar 22,2006 12:54 AM Windows Forms 1
Tags: GridControl
Chris Wescott
Asked On March 21, 2006 11:02 AM

Hi, I was wondering if there was a way to make it so that you can''t move a column in the GGC. I want to make some columns non-moveable while others the user can move. I am currently using something like this but it doesn''t cancel the event. If e.Column = "UWI" Then If e.MouseEventArgs Is Nothing Then If e.Reason = GridQueryAllowDragColumnReason.ShowRedArrowIndicator Then e.AllowDrag = False End If End If Else End If Any ideas.

Administrator [Syncfusion]
Replied On March 22, 2006 12:54 AM

Hi Chris, A column can be prevented from moving by just comparing the e.Column and setting the e.AllowDrag property to False. Below is a code snippet. Private Sub GridGroupingControl1_TableControlQueryAllowDragColumn(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowDragColumnEventArgs) Handles GridGroupingControl1.TableControlQueryAllowDragColumn If e.Column = " UWI" Then e.AllowDrag = False End If End Sub Regards, Calvin.


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.