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.
Syncfusion Feedback

GGC mouse events

Thread ID:

Created:

Updated:

Platform:

Replies:

31622 Jul 11,2005 02:40 PM Jul 11,2005 03:38 PM Windows Forms 3
loading
Tags: GridControl
Ivan
Asked On July 11, 2005 02:40 PM

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 03:17 PM

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.

Ivan
Replied On July 11, 2005 03:34 PM

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 03:38 PM

Try setting e.Inner.Cancel = true.

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.

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

;