Completed
Last Updated: 29 Nov 2016 09:40 by Deo
ADMIN
Hristo
Created on: 25 Nov 2016 11:49
Category: GridView
Type: Bug Report
2
FIX. RadGridView - NullReference exception when deleting an item of the data source used by a child template when the grid is setup in hierarchy and the PageViewMode is set to ExplorerBar
Workaround: create a custom GridDetailViewCellElement
Public Class Form1
    Sub New()

        InitializeComponent()

        AddHandler dgvPatients.CreateCell, AddressOf dgvPatients_CreateCell

    End Sub

    Private Sub dgvPatients_CreateCell(sender As Object, e As GridViewCreateCellEventArgs)
        If e.CellType = GetType(GridDetailViewCellElement) Then
            e.CellElement = New MyGridDetailViewCellElement(e.Column, e.Row)
        End If
    End Sub

End Class

Public Class MyGridDetailViewCellElement
    Inherits GridDetailViewCellElement

    Sub New(column As GridViewColumn, rowElement As GridRowElement)
        MyBase.New(column, rowElement)
    End Sub

    Public Overrides Sub UpdateTabItemsVisibility()
        If Me.DetailsRow Is Nothing Then
            Return
        End If

        MyBase.UpdateTabItemsVisibility()
    End Sub

End Class
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
Deo
Posted on: 26 Nov 2016 10:16
Cool!.
Gervert
Posted on: 26 Nov 2016 06:13
it works thanks!