Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Number of rows in a gridview with paging and a filter.

Number of rows in a gridview with paging and a filter.

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Martin_
    wrote on last edited by
    #1

    Good morning experts, How can I get the total number of rows in a gridview that has paging and a filter. ex. dw.RowFilter = strFilter 'dw is a dataview GridView1.DataSource = dw GridView1.DataBind() gridview1.Rows.Count gives me the number of records in the current page dw.Table.Rows.Count gives me the number of all records ignoring the filter. Thanks

    J 1 Reply Last reply
    0
    • M Martin_

      Good morning experts, How can I get the total number of rows in a gridview that has paging and a filter. ex. dw.RowFilter = strFilter 'dw is a dataview GridView1.DataSource = dw GridView1.DataBind() gridview1.Rows.Count gives me the number of records in the current page dw.Table.Rows.Count gives me the number of all records ignoring the filter. Thanks

      J Offline
      J Offline
      jcdevnet
      wrote on last edited by
      #2

      Use dw.Count instead of dw.Table.Rows.Count when you use the Table property of the dw DataView you're referencing the original table and not the DataView itself

      Greets! Joel

      M 1 Reply Last reply
      0
      • J jcdevnet

        Use dw.Count instead of dw.Table.Rows.Count when you use the Table property of the dw DataView you're referencing the original table and not the DataView itself

        Greets! Joel

        M Offline
        M Offline
        Martin_
        wrote on last edited by
        #3

        Thanks Joe

        J 1 Reply Last reply
        0
        • M Martin_

          Thanks Joe

          J Offline
          J Offline
          jcdevnet
          wrote on last edited by
          #4

          No problem :)

          Greets! Joel

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups