gridview, paging and row count

Discussion in 'ASP .Net' started by DaveyP, Jun 15, 2007.

  1. DaveyP

    DaveyP Guest

    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.
     
    DaveyP, Jun 15, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H5N1
    Replies:
    0
    Views:
    2,724
  2. Replies:
    5
    Views:
    668
  3. SAL

    Gridview row count troubles

    SAL, Oct 15, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    691
  4. J055

    row count in inherited GridView control

    J055, Mar 29, 2006, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    375
    Steven Cheng[MSFT]
    Apr 3, 2006
  5. pickedaname

    Gridview extra header row with command button and paging

    pickedaname, Jun 22, 2006, in forum: ASP .Net Web Controls
    Replies:
    10
    Views:
    687
    pickedaname
    Jul 28, 2006
Loading...

Share This Page