Hi, I am a beginner to asp.net. I want to sort a gridview but the problem i m facing is when sort event handler is called the exception of stack over flow is thrown. Following is my code for sorting function.
protected void sortGridView(string strSortExpression)
{
if (strSortExpression != string.Empty)
{
if (ViewState["sortOrder"] == "desc")
{
dgvBookInfo.Sort(strSortExpression, SortDirection.Ascending); //string.Format("{0}{1}", );
}
else
{
dgvBookInfo.Sort(strSortExpression, SortDirection.Descending);
}
}
}
Thanks