Reputation: 3051
I have a DataTable-Property:
Public Property Files() As DataTable Implements Presenter.ISearchSetup.Files
Get
Return _files
End Get
Set(ByVal value As DataTable)
_files = value
RaiseEvent OnPropertyChanged()
End Set
End Property
Private WithEvents _files As DataTable
Now I add a row with:
Dim row As DataRow
row = Me.Files.Rows.Add()
row.Item("Directory") = "C:/"
row.Item("Files") = 3
But the application raised the TableNewRow-Event only once at the beginning. If I execute the Me.Files.Rows.Add()... etc.. nothing happened.
Upvotes: 0
Views: 694
Reputation: 9016
try this
Dim row As DataRow = Me.Files.NewRow()
row("Directory") = "C:/"
row("Files") = 3
Me.Files.Rows.Add( row)
Upvotes: 1