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" <> wrote in message
> news:...
>
>>How can I get a count of rows in a datagrid?
>>
>
>
>
--
Scott Mitchell [ASP.NET MVP]
http://www.4GuysFromRolla.com/ScottMitchell