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

The problem with DataGridView when the dataSource is empty.

$
0
0

Dear Gurus!

I use next code for creating content of dataGridView:

var source = new BindingSource();
source.DataSource = masterView; // type CollectionView
dataGridView.DataSource = source;

When there is masterView has at least 1 row, then all is fine.

But if after applying the filter masterView is empty, then instead my data I saw next picture:

How to fix?

 


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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