Hello,
I am binding gridview on page load, it has many records, so it takes so much time to load data. How to load it faster, also, it has pagination to it.
Maybe "Load More" option would work, but how to manage it with Pagination and what need to change in coding part.
Thanks in advance !
Benjamin GabrielPosted Nov 20, 2024, 7:14 AM
To implement a "Load More" functionality for your GridView in C#, modify your data query to load a subset of records using SQL's OFFSET and FETCH NEXT or ROW_NUMBER() for pagination. In your C# backend, create a method to fetch paginated data based on the current page number and page size, and bind the first page of data on page load. Add a "Load More" button below the GridView, and in its Click event, fetch the next set of records, append them to the existing GridView data, and update the page number in the ViewState. This approach reduces the initial load time and progressively loads more data when the user clicks "Load More."
It worked for here essaybucket.com for a project, hope it will work for you as well.
Sushant TorankarPosted Nov 15, 2024, 8:35 PM
I am using Oracle databse
Sangeetha SPosted Nov 12, 2024, 11:58 AM
To Load More records in GridView with pagination try this,
ASP.NET
AJAX call
Server side c#
Jayraj ChhayaPosted Nov 12, 2024, 6:03 AM
Hi Sushant Torankar,
To improve the loading speed of your GridView while maintaining pagination, consider implementing asynchronous data loading techniques. Instead of binding all records at once, you can load a subset of data initially and then fetch additional records as needed.
Here’s a basic approach using the "Load More" functionality:
Performance Improvement Tips