bhermer
asked on
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?