If you have ever added code similar to:
You may have seen an error similar to this:
System.Web.HttpException: The GridView 'mygrid' fired event Sorting which wasn't handled.
This is caused by attempting to call the sort method on a grid that does not have it's EnableSorting property set to True. Also, the column you are sorting should also have it's IsSortable and SortField properties defined.