custom gridview pagination

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
I have an aspx page with a gridview that displays data sorted by date. I need to have exactly 5 pages, and each needs to display one years worth of data. The data is on rolling years, so I need page 1 to show
my_date >= DateAdd(year,-1,GetDate())
Then page 2 shows
my_date < DateAdd(year,-1,GetDate()) and my_date >= DateAdd(year,-2,GetDate())
and so on for 5 years (and pages) worth of data.
How do I code the pagination to do this?

View the full article
 
Back
Top