I have a gridview in an updatepanel with sorting enabled and an event handler as follows:
protected void MyGridSort(object sender, GridViewSortEventArgs e)
{
var TheDirection = (e.SortDirection).ToString();
var TheColumn = (e.SortExpression).ToString();
}
I put a breakpoint just after these lines. Every time I press the column header, my variable TheDirection is always showing Ascending.
Why is it not toggling from ascending to descending and back?
Thanks.