ASP.Net GridView Sorting

Posted by Ali Shafai on Stack Overflow See other posts from Stack Overflow or by Ali Shafai
Published on 2009-03-30T00:53:49Z Indexed on 2010/06/05 21:02 UTC
Read the original article Hit count: 542

Filed under:

I have a grid view with AllowSorting set to true. I get an event onsorting when a sortable header is clicked on. the handler has a parameter "GridViewSortEventArgs e" which has a SortDirection property on it. regardless of how many times you click on the same heading, the SortDirection is always Ascending. I think I'm missing something, like a way to tell the grid "now you are sorted based on column one and in ascending order", so that next time the grid sees a click on the "column one" heading, it decides to go descending.

any help appreciated. Cheers, Ali

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about gridview