Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataSet.DataTable INotifyPropertyChanged

$
0
0

Hello,

I am using simple scenario where DataGridView is bound to typed dataset datatable.

For Binding I am using BindingSource (bs)

So...

bs.DataSource = DataSet1

bs.DataMember = myTable

DataGridView1.DataSource = bs

Question I am trying to answer here is:

If I change some data in myTable through code (for example make Button click event that updates some column value), will and how DataGridView get automatically updated?

I know that if I would use BindingList and for example some custom made Class, that class would need to implement INotifyPropertyChanged for each property we need to alert that is changed.

So do I think in right direction saying that all I need to know, is DataTable class implementing INotifyPropertyChanged and are columns set up to send alerts?

When I try this test, DataGridView indeed is getting updated without any need to Refresh

I hope my question is clear and thank You in advance


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>