2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Disable the context menuIn GridGroupingControl, you can disable the context menu for scroll bar by cancelling the ShowContextMenu event. Here, context menu is handled by comparing the width of the ClientRectangle and the width of the mouse pointer for vertical scroll bar. C# this.gridControl1.ShowContextMenu += gridControl1_ShowContextMenu; void gridControl1_ShowContextMenu(object sender, Syncfusion.Windows.Forms.ShowContextMenuEventArgs e) { Point c = this.gridControl1.GridPointToClient(e.Point); //Comparing the point for vertical scroll bar if (this.gridControl1.ClientRectangle.Width < c.X) { //context menu has been handled e.Cancel = true; } } VB AddHandler Me.gridControl1.ShowContextMenu, AddressOf gridControl1_ShowContextMenu Private Sub gridControl1_ShowContextMenu(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.ShowContextMenuEventArgs) Dim c As Point = Me.gridControl1.GridPointToClient(e.Point) ‘Comparing the point for vertical scroll bar If Me.gridControl1.ClientRectangle.Width < c.X Then 'context menu has been handled e.Cancel = True End If End Sub Samples: C#: ContextMenu VB: ContextMenu |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.