Datagrid NextPrev and NumericPages in PagerStyle

Posted on 2006-05-10
Last Modified: 2008-01-09

I have a datagrid control on a page and I would like to use both Next & Previous and Numeric pages:

< 1 2 3 4 5 >

It wont let me use both, any ideas? I understand I could probably develop a custom pager but I would prefer not to if possible.
Question by:bhermer
    LVL 17

    Accepted Solution

    use the custom paginning and make your pagination bar
    LVL 4

    Author Comment

    Thought that may be the answer, but I was hoping someone could think around this, I will leave open for a while to see, but I presume I would to do something like:

    On my PageIndexChanged event multiply the page index by my per page count, redo my SQL to say something like

    dim StartRecord as integer = ((e.NewPageIndex * 10) - 10)
    dim EndRecord as integer = (e.NewPageIndex * 10)

    "SQL = "SELECT "  & StartRecord & " TO " & EndRecord  & ",* FROM table WHERE field=value"

    But the trouble is "SELECT 1 TO 10" doesnt work. Any idea how to return 10 rows with SQL and and specify the starting point?

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now