Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > gridview, paging and row count

Thread Tools

gridview, paging and row count

Posts: n/a
I've got a gridview bound to an SqlDataSource, with a a page size of
20 rows. Great, no worries! The users decided they wanted a total rows
returned count, and that's where the fun(?) started.

Normally, I'd just set up a counter on the OnrowDataBound event, or
I'd look at gridview.rows.count, but all they return now, is the
number of rows on that particular page - ie 20.

Now call me a whinger, but I already knew that. After all, I blo*dy
well set it.

So, my question is, what's an easy way of finding out how many rows in
the dataset (and no, I'm not prepared to query the database again to
get a total).


Reply With Quote

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
DataGrid.Items.Count and DataGrid Paging... Green Start Button ASP .Net 2 08-02-2006 02:01 AM
Having paging numbers and page count on the footer in Datagrid Patrick.O.Ige ASP .Net 3 10-17-2005 07:19 AM
ok I can do a totals row but how about a percentage row after each data row D ASP .Net Datagrid Control 0 05-23-2005 04:10 PM
Combining numeric mode paging and nextPreview paging in datagrid Red ASP .Net 1 03-12-2005 11:41 PM
I am adding a new row to the datagrid dynamically but if i use the Count property of Item it is not showing the count of the new rows being added Praveen Balanagendra via .NET 247 ASP .Net 2 06-06-2004 07:16 AM