How to sort records in grid view on click of header of a column
I wanted to sort a grid view by column when user clicks on a column header. Here user can click any column and grid view is sorted based on the column clicked. This is my code: <asp:GridView ID="gvEmployeeStatus" runat="server" AutoGenerateColumns="false" AllowPaging="True" PageSize="10" AllowSorting="true" OnPageIndexChanging="gvEmployeeStatus_PageIndexChanging" OnSorting="gvEmployeeStatus_Sorting" > protected void gvEmployeeStatus_Sorting(object sender, GridViewSortEventArgs e) { loginName = (String)(Session["LoginName"]); dsLoginDetail = clsBLogic.TblLogin(loginName); tblEmployeeNo = dsLogi
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.