How to sort using GridView and ObjectDataSource?
I have a GridView with an ObjectDataSource and I want to be able to sort it. Paging works correctly, however Sorting gives me an exception: The GridView gridView fired event Sorting which wasn't handled. How do I enable sorting on the server side? (i.e. gridView.EnableSortingAndPagingCallbacks must remains false) Set the gridView.AllowSorting property to true. From here the grid should allow you to sort data automatically on postback if you are using an object that implements IBindingList. However, since that is most likely not the case, you should take TheTXI's advice above and handle the