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)
 
Back
Top