I have a gridview that supports paging and sorting by mulitple columns. The problem that I am having is that when I click to the next page the sorting falls apart. Can anyone tell me how to get sorting to persist. Here is my current relevant code:
Protected Sub gvPolicyData_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles gvPolicyData.Sorting
Dim sortingDirection As String = String.Empty
If dir = SortDirection.Ascending Then
dir = SortDirection.Descending
sortingDirection = "Desc"
Else
dir = SortDirection.Ascending
sortingDirection = "Asc"
End If
Session("policySortExp") = e.SortExpression
Dim sortedView As New DataView(gvPolicyData_Bind())
sortedView.Sort = Convert.ToString(e.SortExpression) & " " & sortingDirection
gvPolic ...
Go to the complete details ...