我在点击时尝试对datagrid列进行排序,最后我收到了以下错误消息:
System.IndexOutOfRangeException:找不到列ibsn。
该代码适用于其他列。不确定我哪里出错了。
Sub Sort_Grid(ByVal sender As Object, ByVal e As DataGridSortCommandEventArgs)
if Session("MyCurrentSort") = e.SortExpression then
Session("MyCurrentSort") = e.SortExpression & " desc"
else
Session("MyCurrentSort") = e.SortExpression
end if
BindGrid()
End Sub