[thelist] ASP DataGrid: -Sortby Question
Casey
aspnet at thecrookstons.com
Mon Aug 22 12:50:27 CDT 2005
Ok,
I've got my little datagrid working with sorting. Click enough. However,
it's only able to sort from top-down. If the user wants to re-sort the same
colum from bottom-up, they are out of luck. Formulating the query is no
problem, just put a - infront of the ORDER BY variable. But obviously
that's not good enough. Somehow in the DataGrid_Sort sub I need to
determine thet the user has requested the same column to be sorted again,
and then make the variable passed to BindDataGrid have a - in front of it.
I'm sure someone has dealt with this before, yea?
TIA!!
<asp:DataGrid
id="gridDocs"
AllowSorting="True"
OnSortCommand="DataGrid_Sort"
....
Sub DataGrid_Sort(s As Object, e As DataGridSortCommandEventArgs)
BindDataGrid(e.SortExpression)
end sub
More information about the thelist
mailing list