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

DataGridView Binding Problem: Rows are all empty

$
0
0

I am binding a business object that inherits from BindingList(Of T) to the DataGridView.

 

When I bring up the form, the correct number of (empty) rows are displayed, but there is no data.

 

In the debugger, I look at the DataPropertyName for each column, and they are correct.

I look at the Rows(index).DataBoundItem, and it is correct!!!

But the Value property of each cell is Nothing and no data appears in the grid.

 

How can the row have a valid DataBoundItem, the column have a valid DataPropertyName, but the cell have no value?

 

I tried every style of refresh/reset that I could think of to no avail.

 

One additional important point ... If I run this form as the startup form of my project IT DOES WORK. It only does NOT work when I bring is up from another form, which is a custom Windows Forms designer.

 

Any hints would be appreciated!!


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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