Datagrid NextPrev and NumericPages in PagerStyle

Posted on 2006-05-10
Medium Priority
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 18

Accepted Solution

Elvio Lujan earned 1000 total points
ID: 16648445
use the custom paginning and make your pagination bar

Author Comment

ID: 16648758
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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 …
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

862 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