Sorting a GridView
Posted on 2009-07-11
I am using a GridView with the AllowSorting="True" and the method OnSorting="gv_Sorting" implemented.
Still, When trying to filter the table and keep the sorting:
if (ViewState["SortDirection"] != null)
if (ViewState["SortDirection"].ToString() == "Ascending")
When reaching gv.Sort I get the exception: "The GridView 'gv' fired event Sorting which wasn't handled."
Why is that happening?