Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > rowcount

Reply
Thread Tools

rowcount

 
 
et
Guest
Posts: n/a
 
      09-22-2005
How can I get a count of rows in a datagrid?


 
Reply With Quote
 
 
 
 
Jack Li
Guest
Posts: n/a
 
      09-22-2005
You may want to use:
DataTable.Rows.Count

Regards,
Jack Li
MVP (ASP.NET)

"et" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I get a count of rows in a datagrid?
>



 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      09-22-2005
datagrid.Items.Count


HTH


"et" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I get a count of rows in a datagrid?
>
>



 
Reply With Quote
 
Scott Mitchell [MVP]
Guest
Posts: n/a
 
      09-23-2005
Jack Li wrote:
> You may want to use:
> DataTable.Rows.Count


This assumes that you are binding a DataTable to a DataGrid. But if
you're binding a DataReader this approach won't work. (If you're
binding an Array or other collection, you can use similar code - just
utilize the Count property.)

A more flexible approach is, *after* you bind the data to the DataGrid,
check out the DataGridID.Items.Count property.

hth


> Regards,
> Jack Li
> MVP (ASP.NET)
>
> "et" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>How can I get a count of rows in a datagrid?
>>

>
>
>



--

Scott Mitchell [ASP.NET MVP]
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.4GuysFromRolla.com/ScottMitchell
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting rowcount from within a repeater control Darrel ASP .Net 2 12-29-2008 04:50 AM
getting rowcount segue ASP .Net 4 01-23-2008 09:42 PM
SqlDataReader - ReturnValue - rowcount Jon Haakon Ariansen ASP .Net 3 11-08-2006 04:35 PM
ODS + TableAdapter + Rowcount robert madrian ASP .Net 0 12-19-2005 05:45 PM
DB API specification of .rowcount and/or execute andychambers2002@yahoo.co.uk Python 1 11-14-2005 03:41 PM



Advertisments