Paging through many rows
A grid with a thousand rows is unusable. Paging shows a slice at a time and gives the visitor a way to move between slices.
Turn it on
Markup
<asp:GridView id="productsGrid" runat="server"
DataSourceID="productsSource"
AllowPaging="true" PageSize="10" />What to consider
- Choose a page size that fits the screen without endless scrolling. Ten to twenty rows is a common choice.
- Keep sorting and paging working together, so a sorted list stays sorted across pages.
- For very large tables, fetch only the rows for the current page rather than all of them.
Think about the query. Paging that fetches every row and shows ten still pays for every row. On a large table, page in the database instead.
Add a search box next in searching from a form.