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
AD
Administrator
Syncfusion Team
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.
IV
Ivan
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
AD
Administrator
Syncfusion Team
July 11, 2005 07:38 PM UTC
Try setting e.Inner.Cancel = true.