Hi,@Roger Schlueter. Welcome Microsoft Q&A.
I add data to the collection to test it can successfully populate the DataGrid. You could try to refer to the code below and check your code. Please let me know if there is any problem.
<Window.DataContext>
<local:MainWindowVM/>
</Window.DataContext>
<Grid>
<DataGrid Width="400" Height="300" ItemsSource="{Binding TransactionsEx }"/>
</Grid>
Public Class MainWindowVM
Private _TransactionsEx As New ObservableCollection(Of TransactionEx)
Public Property TransactionsEx As ObservableCollection(Of TransactionEx)
Get
Return _TransactionsEx
End Get
Set(value As ObservableCollection(Of TransactionEx))
_TransactionsEx = value
End Set
End Property
Public Sub New()
_TransactionsEx.Add(New TransactionEx() With {
.Id = 1,
.Name = "user1",
.Detail = "detail1"
})
_TransactionsEx.Add(New TransactionEx() With {
.Id = 2,
.Name = "user2",
.Detail = "detail2"
})
_TransactionsEx.Add(New TransactionEx() With {
.Id = 3,
.Name = "user3",
.Detail = "detail3"
})
End Sub
End Class
Public Class TransactionEx
Inherits Transaction
Private _detail As String
Public Property Detail As String
Get
Return _detail
End Get
Set(ByVal value As String)
Me._detail = value
NotifyPropertyChanged("Detail")
End Set
End Property
End Class
Public Class Transaction
Implements INotifyPropertyChanged
Private _id As Integer
Public Property Id As Integer
Get
Return _id
End Get
Set(ByVal value As Integer)
Me._id = value
NotifyPropertyChanged("Id")
End Set
End Property
Private _name As String
Public Property Name As String
Get
Return _name
End Get
Set(ByVal value As String)
Me._name = value
NotifyPropertyChanged("Name")
End Set
End Property
Public Event PropertyChanged As PropertyChangedEventHandler _
Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(ByVal propertyName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
End Sub
End Class
The result:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.