Completed
Last Updated: 16 Oct 2015 06:56 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 23 Jul 2014 10:18
Category: GridView
Type: Bug Report
0
FIX. RadGridView - right click over a cell shows grid's context menu and form's context menu
To reproduce:
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Me.ProductsTableAdapter.Fill(Me.NwindDataSet.Products)
    Dim menu As New ContextMenu()
    For index = 1 To 4
        menu.MenuItems.Add("item" & index)
    Next
    Me.ContextMenu = menu
End Sub

Workaround:

Const WM_CONTEXTMENU As Integer = &H7B

Public Class Grid
Inherits RadGridView
    Protected Overrides Sub WndProc(ByRef m As Message)
        If m.Msg = WM_CONTEXTMENU Then
            Return
        End If
        MyBase.WndProc(m)
    End Sub

    Public Overrides Property ThemeClassName As String
        Get
            Return GetType(RadGridView).FullName
        End Get
        Set(value As String)
            MyBase.ThemeClassName = value
        End Set
    End Property
End Class
0 comments