dataGridView.Rows.Count and datagridview.RowCount

dataGridView.Rows.Count and datagridview.RowCount

Post by SePp » Wed, 16 Jan 2008 19:05:17


Hello all,

I want to display the number of items in an datagridview. I use this
one datagridview for different datasets.


The datagridview.Rowcount works fine for the most of the dataset. But
there is one dataset which has more items
than the others and the Rowcount wont work. The result is all the time
0, but it should be something like 85.

// Datsource
this.dataGridView1.DataSource = this.REMINDERBindingSource;
this.v_REMINDERTableAdapter.Fill(this.subnr.REMINDER);

// Display number of items
lbl_row.Text = dataGridView1.RowCount.ToString();
MessageBox.Show(this, dataGridView1.Rows.Count.ToString());

Has somebody an Idea? Thanks in advance.

Greets
SePp