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. Paging problem in datagrid

Paging problem in datagrid

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorial
2 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.
  • K Offline
    K Offline
    kinnuP
    wrote on last edited by
    #1

    hi all, paroblem as follows, i am using third party control for page navigation.the index of the datagrid current page index not matching with the third party control index.for example when i am deleting last record in second page i am able to bind with the first page. but if am deleting any record in first page it is throwing exception "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." the code as follows : this.dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage; //Reset the page Navigation if deleting the only record on the last page. if (dgUserList.Items.Count <= 1 && dgUserList.CurrentPageIndex == dgUserList.PageCount - 1) { if (this.dgnNav.CurrentPage <= dgUserList.PageCount && this.dgnNav.CurrentPage > 0) { dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage - 1; } } this is the page index of third party control this.dgnNav.CurrentPage; Thanks And Regards, Guru

    P 1 Reply Last reply
    0
    • K kinnuP

      hi all, paroblem as follows, i am using third party control for page navigation.the index of the datagrid current page index not matching with the third party control index.for example when i am deleting last record in second page i am able to bind with the first page. but if am deleting any record in first page it is throwing exception "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." the code as follows : this.dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage; //Reset the page Navigation if deleting the only record on the last page. if (dgUserList.Items.Count <= 1 && dgUserList.CurrentPageIndex == dgUserList.PageCount - 1) { if (this.dgnNav.CurrentPage <= dgUserList.PageCount && this.dgnNav.CurrentPage > 0) { dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage - 1; } } this is the page index of third party control this.dgnNav.CurrentPage; Thanks And Regards, Guru

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Have you tried asking the makers of the third party control?

      "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      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