Below is my code to implement sorting on datagrid, but i notice that it only works for 1st page, but not subsequent ones. Any idea wat's wrong?
Public Sub dgResults_SortCommand(ByVal s As Object, ByVal e As DataGridSortCommandEventArgs)
If lblSort.Text.Equals("ASC") Then
lblSort.Text = "DESC"
Else
lblSort.Text = "ASC"
End If
dv.Sort = e.SortExpression + " " + lblSort.Text
dgResults.DataSource = dv
dgResults.DataBind()
End Sub