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

GGC mouse events

Thread ID:





31622 Jul 11,2005 06:40 PM UTC Jul 11,2005 07:38 PM UTC WinForms 3
Tags: GridControl
Asked On July 11, 2005 06:40 PM UTC

Hi, I''m trying to display a context menu in GGC whan a user RIGHT clicks on a column header. Initially I tried to wire gridGroupingControl.MouseDown /MouseUp - but none of them would fire. Then I tried: gridGroupingControl.TableControlCellMouseUp and gridGroupingControl.TableControlCellClick , which worked ok, but I still have 2 problems: 1. When I set gridGroupingControl.TableControl.Model.Options.SelectCellsMouseButtonsMask=MouseButtons.Left the event would fire on right click. 2. When I''m tring to detect cell type inside a handler: GridCurrentCell cc = e.TableControl.CurrentCell; GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex]; style.TableCellIdentity.TableCellType will be set to either AnyCell or AnyRecordFieldCell, but not to ColumnHeaderCell or AnyHeaderCell. Could you please point me to right direction? Thank you

Administrator [Syncfusion]
Replied On July 11, 2005 07:17 PM UTC

Instead of trying to use the CurrentCell.RowIndex, ColIndex to try to get the row/col to use to retrieve the style, use e.TableControl.PointToRowCol.

Replied On July 11, 2005 07:34 PM UTC

Thank you. This works great! How do I go about suppressing the Right Click event, so it does not get passed to the grid and column does not get sorted? Thank you

Administrator [Syncfusion]
Replied On July 11, 2005 07:38 PM UTC

Try setting e.Inner.Cancel = true.


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