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

Disallow 1 column to Drag

Thread ID:





42159 Mar 21,2006 04:02 PM UTC Mar 22,2006 05:54 AM UTC WinForms 1
Tags: GridControl
Chris Wescott
Asked On March 21, 2006 04:02 PM UTC

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 05:54 AM UTC

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.

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