To reproduce:
1. Run the attached application.
2. Click into the cell in Column One and expand the combo box
3. While the combo box is still expanded, right click on any header cell in the grid
Step 3 should result in a NullReferenceException
Workaround:
Friend Class MyGridHeaderCellElement
Inherits GridHeaderCellElement
Public Sub New(ByVal col As GridViewColumn, ByVal row As GridRowElement)
MyBase.New(col, row)
End Sub
Protected Overrides Sub ShowContextMenu()
If Me.ViewTemplate IsNot Nothing Then
MyBase.ShowContextMenu()
End If
End Sub
Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
Get
Return GetType(GridHeaderCellElement)
End Get
End Property
End Class
Private Sub radGridView1_CreateCell(ByVal sender As Object, ByVal e As GridViewCreateCellEventArgs)
If Object.ReferenceEquals(e.CellType, GetType(GridHeaderCellElement)) Then
e.CellType = GetType(MyGridHeaderCellElement)
End If
End Sub