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

QueryAllowDragColumnHeader fired when columns not dragged

Thread ID:

Created:

Updated:

Platform:

Replies:

72153 Mar 5,2008 01:51 PM UTC Apr 29,2008 11:42 AM UTC WinForms 5
loading
Tags: GridControl
Satish
Asked On March 5, 2008 01:51 PM UTC

The event QueryAllowDragColumnHeader is raised when 2 columns are clicked in quick succession.

Please let me know if a fix would be provided, as our application has a bug filed related to this.

Our application uses Essential Studio 6.1.0.34.


Administrator [Syncfusion]
Replied On March 11, 2008 11:19 PM UTC

Hi Sathish,

Thank you for your patience.

The TableControlQueryAllowDragColumn event is raised when you mouseover the column header in a GroupingGrid. In that event handler, you can check the reason for getting raised this event by using e.Reason property from the GridQueryAllowDragColumnEventArg. Below are the codes:


void gridGroupingControl1_TableControlQueryAllowDragColumn(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowDragColumnEventArgs e)
{
if (e.Reason == GridQueryAllowDragColumnReason.HitTest)
{
Console.WriteLine("Indicate hitting is occur");
}
else if (e.Reason == GridQueryAllowDragColumnReason.MouseUp)
{
Console.WriteLine("Indicate mouse up");
}
else if (e.Reason == GridQueryAllowDragColumnReason.Remove)
{
Console.WriteLine("Occurs When removed group column");
}
else
{
Console.WriteLine(" Indicate RedArrowIndicator is displayed");
}

}


Please let me know if this helps.

Regards,
Srirajan



Satish
Replied On March 12, 2008 07:20 AM UTC

Is there a way to prevent that event from being fired or any other way to handle the event, as we want the grid not to swap the columns if they are just being clicked.


Administrator [Syncfusion]
Replied On March 25, 2008 05:29 PM UTC

Hi Satish,

Thank you for your patience.

You need to handle TableControlQueryAllowDragColumn and set the e.AllowDrag to false to prevent the swapping of the columns in a grid. Please refer the code below for more details.


void gridGroupingControl1_TableControlQueryAllowDragColumn(object sender, GridQueryAllowDragColumnEventArgs e)
{
e.AllowDrag = false;
}


Please let me know if this helps.

Best Regards,
Srirajan



Satish Janakiraman
Replied On April 15, 2008 09:15 AM UTC

Hi,

Thanks for the update. I still want to enable column reordering. The issue that I face is that, the columns are reordered when any two columns are just clicked (not dragged) in quick succession.

regards,
Satish


Satish Janakiraman
Replied On April 29, 2008 11:42 AM UTC

Do I have an update on my previous post?

Thanks,
Satish


CONFIRMATION

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

;