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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Fooling DataPager Control

Fooling DataPager Control

Scheduled Pinned Locked Moved ASP.NET
helpcsstutorial
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.
  • J Offline
    J Offline
    Juvil John
    wrote on last edited by
    #1

    Hi, I need to know how to fool a data pager. I have a grid which is bound to a List, and since I am not using object data source I need to manually manage the paging event for the grid. now my grid is paged using datapager control, and I have a scenario. when I do a paging event, I take the current page, and the pagesize to get the exact items to bind to the grid. using skip and take method, I managed the paging well. but the problem comes when I bind the paged rows the datapager does not work anymore, since its taking the data from the grid which only have the exact rows, it tends to render that it does not have a next/prev page. now I need to fool the datapager of the exact rows that I am paging or have a fix datapager fields. any suggestion would be great.

    C 1 Reply Last reply
    0
    • J Juvil John

      Hi, I need to know how to fool a data pager. I have a grid which is bound to a List, and since I am not using object data source I need to manually manage the paging event for the grid. now my grid is paged using datapager control, and I have a scenario. when I do a paging event, I take the current page, and the pagesize to get the exact items to bind to the grid. using skip and take method, I managed the paging well. but the problem comes when I bind the paged rows the datapager does not work anymore, since its taking the data from the grid which only have the exact rows, it tends to render that it does not have a next/prev page. now I need to fool the datapager of the exact rows that I am paging or have a fix datapager fields. any suggestion would be great.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Best bet is to write your own paging control, and perhaps use a repeater, so you have more control over what gets rendered.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      J 1 Reply Last reply
      0
      • C Christian Graus

        Best bet is to write your own paging control, and perhaps use a repeater, so you have more control over what gets rendered.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        J Offline
        J Offline
        Juvil John
        wrote on last edited by
        #3

        any other way?

        C 1 Reply Last reply
        0
        • J Juvil John

          any other way?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Anything else would be a hack, far more prone to bugs. The most obvious way, is to build a data source and bind to it, even if it doesn't come from a DB

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          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