By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

number of rows in a datagrid

P: n/a
Is there a way to find out the number of rows in a datagrid without
accessing the original datatable or dataset on which the recordsource is
based?

x = datagrid1.rows.count would be cool, but it's not there.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Is there a way to find out the number of rows in a datagrid without
accessing the original datatable or dataset on which the recordsource is
based?


You can find it from the count of the data in the grid which is the
datasource, why should there be another methode?

Cor
Nov 20 '05 #2

P: n/a
That's fine. My confusion was that the datasource was no longer declared by
the time I wanted to know how many rows. It hadn't initially occurred to me
to dim a new dataset and make it equal to the datasource of the datagrid in
order to get the count property.

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Is there a way to find out the number of rows in a datagrid without
accessing the original datatable or dataset on which the recordsource is
based?


You can find it from the count of the data in the grid which is the
datasource, why should there be another methode?

Cor

Nov 20 '05 #3

P: n/a
Hi Curtis

You dont have to redeclare another dataset if all you want is a row count.

Me.BindingContext(Me.dgMyDataGrid.Datasource).Coun t

should do the trick.

hth
Richard
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.