Paging links with Gridview - NextPrevious with numerics?

Discussion in 'C#' started by fluid, Jan 18, 2007.

  1. #1
    Does anybody know how to display the Previous and Next buttons wrapped outside the page number links in gridview? For eg:

    Prev 1 2 3 4 5 6 7 8 9 ... Next

    The PagerSettings allows just 4 options and i am unable to get the gridview to display it as above. I have however written a next/previous button(on click event) which would perform the task but it's separate from the number links as follows:

    1 2 3 4 5 6 7 8 9 ...

    Prev Next

    I want them to be displayed inline with each other.

    Any ideas?
     
    fluid, Jan 18, 2007 IP
  2. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Post your code snippet

    -SSJ
     
    saurabhj, Jan 19, 2007 IP
  3. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Yah, this was a big issue for us because the way their paging is setup is so limited. You can target inside the Gridview's controls. I actually have the code at work, so I can send Monday - but If my memoryservers me right - it was like GridViewID.controls(0).children.controls(0).children.co....... just keep counting the children of each control and you'll find it. Then you can insert a Cell with whatever control you want (in your case probably a label, or literal) with the Prev and Next text.

    Like I said, I would play around with it but if you don't have it by Monday, I can send :) - just drop me a PM please so I rememer, hehe
     
    ccoonen, Jan 19, 2007 IP