gridview, paging and row count

D

DaveyP

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).

Cheers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top