Datagrid NextPrev and NumericPages in PagerStyle

Hi,

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.
LVL 4
bhermerAsked:
Who is Participating?
 
Elvio Lujan.Net Senior DeveloperCommented:
use the custom paginning and make your pagination bar
0
 
bhermerAuthor Commented:
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?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.