![]() |
rowcount
How can I get a count of rows in a datagrid?
|
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? > |
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? > > |
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.