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