Here Mudassar Ahmed Khan has explained with an example, how to perform Custom Paging in WebGrid using Stored Procedure and Entity Framework in ASP.Net MVC Razor.
Custom Paging will be performed at Database level inside the Stored Procedure using the ROW_NUMBER function.
The PageIndex and PageSize values will be passed to the Stored Procedure using Entity Framework and only the specific records will be fetched and displayed in WebGrid, thus reducing the bandwidth usage.
↧