I have a gridview that could end up displaying about 5K records. I currently have it setup to use paging so it displays 200 records at a time. To add usability I'd like to provide the end user with some feedback that will allow them to locate a record easier. I was hoping there was a way that the user could put the mouse over one of the pager links and a tooltip would display the range of records available on the page.
For instance:
The user puts the mouse over the Page #1 link and the tooltip reads ABOTT - BUELLER The user puts the mouse over the Page #14 link and the tooltip reads MARTIN - PELLIGRINO
How would I accomplish this in ASP.NET?
You could do the following. First create an empty PagerTemplate:
Now in response to the DataBound event you can add controls to the pager row. This code just adds the page numbers as LinkButtons.
You'll also need to handle the PageIndexChanging event.
Now all that remains is to work out what the ToolTip text should be. For that you'll need the indices of the top and bottom rows for every page. In this example they would be: