ASP.NET - paging in gridview seemoreitems instead of numbers

Asked By msakt on 28-Jun-12 01:02 AM
paging in gridview show seemoreitems..

first bind 10 per footer show seemoreitems..if click here another 10 records bind
S K replied to msakt on 28-Jun-12 01:11 AM
There are lots of good stuff on internet for paging example in gridview in
Some of these are good 

the concept are same only you can display your choice setting based on your requierment means you can put "SeeMoreItems" instead of next button caption etc.

hope this helps you
Vikram Singh Saini replied to msakt on 28-Jun-12 01:42 AM

The paging concept in gridview has been provided for this very reason. Yes! The first ten records (or whatever set by developer) are bind to gridview while displaying records in page.

When you click on next page number, then next 10 records are binded to gridview. The gridview works in this way for optimum performance. You can use custom paging in Pager template within gridview as:

 <asp:LinkButton ID="hlNext" Text="See more items" OnClick="hlNext_Click" />

And in code-behind file:

protected void hlNext_Click(object sender, EventArgs e)
     // Get the current page selected
      int CurIndex = GridView1.PageIndex;
     // Increment index by 1
      GridView1.PageIndex = CurIndex + 1;

      // Populate your grid
      GridView1.DataSourceID = "adsUploadedFiles";