sql Count function

  • Thread starter Thread starter jtnpham
  • Start date Start date
J

jtnpham

Is there any way to count the number of rows displayed in a data grid
view and then store that number to a variable? For instance, my sql
statement to display the data table displays only four rows, so then I
would like my n = 4. And it would change accordingly to however many
rows are displayed.

Thanks! =)

Any help would be wonderful!!!
 
Hi,

what about
this.dataGridView.Rows.Count

(replace dataGridView by the name of your datagridview)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top