Optimized Paging and Sorting in ASP.NET GridView
Introduction Paging and sorting are most commonly used features of ASP.NET GridView. And it is very easy to use/implement these features in GridView with small chunk of lines. In this article I am going to demonstrate what are the performance drawbacks of using conventional way to page and sort your GridView and then I will demonstrate 'An Optimized way to implement Paging and Sorting'. What are conventional steps for Paging and Sorting? Usually we perform the following steps to enable paging and sorting in our GridView. 1. Set AllowPaging and AllowSorting Properties of GridView to True to enable paging and sorting respectively e.g view source print ? 1. < asp:GridView ID = "GridView1" runat = "server" AllowPaging = "true" AllowSorting = "true" > 2. asp:GridView > 2. Set the PageSize property to mention how many records will be display on each page. 3. Set the SortExpression property of each column. By def...