DataGrid.Items.Count and DataGrid Paging...

Discussion in 'ASP .Net' started by Green Start Button, Aug 4, 2005.

  1. Hello, Folks!

    How can you get the DataGrid.Items.Count to reflect the FULL record count instead of displaying the page size?

    I'm using this property and all it's displaying is the page size of 10.

    TIA...
     
    Green Start Button, Aug 4, 2005
    #1
    1. Advertising

  2. Green Start Button

    Marina Guest

    Count the number of rows in the data source.

    The grid is correct - it only has the number of items that is the page size. It is the datasource that has them all.
    "Green Start Button" <> wrote in message news:eek:...
    Hello, Folks!

    How can you get the DataGrid.Items.Count to reflect the FULL record count instead of displaying the page size?

    I'm using this property and all it's displaying is the page size of 10.

    TIA...
     
    Marina, Aug 4, 2005
    #2
    1. Advertising

  3. Green Start Button

    agravar

    Joined:
    Aug 2, 2006
    Messages:
    1
    You can't the total record count from the datagrid property if you are using paging, instead you must get it from the dataset. It be something like this:

    ds.Tables(0).Rows.Count
     
    agravar, Aug 2, 2006
    #3
    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. wh1974
    Replies:
    0
    Views:
    2,468
    wh1974
    Jan 12, 2005
  2. Red
    Replies:
    1
    Views:
    750
  3. Patrick.O.Ige
    Replies:
    3
    Views:
    542
    Patrick.O.Ige
    Oct 17, 2005
  4. Replies:
    2
    Views:
    609
  5. jason smith

    Getting Total Item Count in Paging Datagrid

    jason smith, Jul 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    276
    Alvin Bruney
    Jul 23, 2003
Loading...

Share This Page