onsorting="Gridview_sorting"
and
Protected Sub GridView_Sorting(ByVal sender As Object, ByVal e As
GridViewSortEventArgs)
...
End Sub
Can somebody point me in the right direction in how to finish this, I
presume with e.sortdirection and/or e.sortexpression. I found some C#
code I tried to convert, but vb.net knows nothing about
ConversionHelpers or CovertSortDirectionToSQL. I am unclear about how
the sorting is even going to work.
Protected Sub RatePlanGridView_Sorting(ByVal sender As Object,
ByVal e As GridViewSortEventArgs)
Dim dataTable As DataTable =
CType(ConversionHelpers.AsWorkaround(RatePlanGridV iew.DataSource,
GetType(DataTable)), DataTable)
If Not (dataTable Is Nothing) Then
Dim dataView As DataView = New DataView(dataTable)
dataView.Sort = e.SortExpression + " " +
ConvertSortDirectionToSql(e.SortDirection)
RatePlanGridView.DataSource = dataView
RatePlanGridView.DataBind()
End If