Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   rowcount (http://www.velocityreviews.com/forums/t762316-rowcount.html)

et 09-22-2005 01:01 AM

rowcount
 
How can I get a count of rows in a datagrid?



Jack Li 09-22-2005 03:47 AM

Re: rowcount
 
You may want to use:
DataTable.Rows.Count

Regards,
Jack Li
MVP (ASP.NET)

"et" <eagletender2001@yahoo.com> wrote in message
news:u12J3ExvFHA.596@TK2MSFTNGP12.phx.gbl...
> How can I get a count of rows in a datagrid?
>




Elton Wang 09-22-2005 03:11 PM

Re: rowcount
 
datagrid.Items.Count


HTH


"et" <eagletender2001@yahoo.com> wrote in message
news:u12J3ExvFHA.596@TK2MSFTNGP12.phx.gbl...
> How can I get a count of rows in a datagrid?
>
>




Scott Mitchell [MVP] 09-23-2005 03:59 AM

Re: rowcount
 
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" <eagletender2001@yahoo.com> wrote in message
> news:u12J3ExvFHA.596@TK2MSFTNGP12.phx.gbl...
>
>>How can I get a count of rows in a datagrid?
>>

>
>
>



--

Scott Mitchell [ASP.NET MVP]
mitchell@4GuysFromRolla.com
http://www.4GuysFromRolla.com/ScottMitchell


All times are GMT. The time now is 04:29 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57