How reflect the changes in array to bound grid

  • Thread starter Thread starter Latha
  • Start date Start date
L

Latha

I have bound a array of objects to datagridview in vb.net. If I add new
objects to array, that doesn't reflect in datagridview. What I have to do?

Thanks,
Latha.P
 
I have bound a array of objects to datagridview in vb.net. If I add new
objects to array, that doesn't reflect in datagridview. What I have to do?

Use BindingList(Of T) instead of an array. It implements a lot of
binding related events.

If you want changes to the objects in the list to be reflected in the
bound controls, the objects in the list need to implement
INotifyPropertyChanged. See
<http://msdn2.microsoft.com/en-us/library/ms229614.aspx> for an
example.
 
Back
Top