All that answer not fully correct. I use That:
protected void SetPageSort(GridViewSortEventArgs e)
{
if (e.SortExpression == SortExpression)
{
if (SortDirection == "ASC")
{
SortDirection = "DESC";
}
else
{
SortDirection = "ASC";
}
}
else
{
if (SortDirection == "ASC")
{
SortDirection = "DESC";
}
else
{
SortDirection = "ASC";
}
SortExpression = e.SortExpression;
}
}
protected void gridView_Sorting(object sender, GridViewSortEventArgs e)
{
SetPageSort(e);
in gridView_Sorting...