I am working on a website in VS2010 and I have a datatable that has over 10,000 rows in it, all in a single column. (the entries are the different login IDs for all the employees at my company) Currently I am displaying all the entries in a single column of a gridview.
<asp:GridView ID="gvUsers" runat="server" BackColor="White" AutoGenerateColumns="False" GridLines="Horizontal">
<Columns>
< asp:HyperLinkField DataTextField = "NTlogin" HeaderText = "Users" DataNavigateUrlFields = "NTlogin" DataNavigateUrlFormatString = "FCS3UserInfo.aspx?user={0}" />
</Columns>
</asp:GridView>
What I would like to do is place these entries over a number of pages. So if on a given day the dataTable has 9,999 entries there is 5 pages, but if it has 10,001 entries there are 6 pages of users and so on. If possible I would like to have an even number of users between the pages.
If someone could point me in the direction of a tutorial that would help I’d be grateful.
What you are looking for is called Paging. Look through that tutorial and it may push you in the right direction.