Completed
Last Updated: 21 Jun 2016 08:11 by ADMIN
ADMIN
Dimitar
Created on: 01 Apr 2016 10:28
Category: GridView
Type: Bug Report
1
FIX. RadGridView - exception when the BeginUpdate/EndUpdate is used in the CellEndEdit event handler.
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
0 comments