Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting DataGrid's Row Count?

Status
Not open for further replies.

DLLHell

Programmer
May 9, 2003
69
US
I have a Datagrid where you can show it with AllowPaging=true and AllowPaging=false depending on the Paging mode preferred via a button.

Using DataGrid.Items.Count returns the total number if you use AllowPaging=false and returns only the number for that one page if you use AllowPaging=true.

Any other methods come to mind - is there some way to get the number of rows from a SQL Select statement other than having to do another Select Count?

Thanks for any help here.
 
You could get the total records from your dataset before you bind the grid. That way you'd know exactly how many records were actually recieved.

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top