0
我是asp.net的初學者。我想排序gridview,但我面臨的問題是當排序事件處理程序被稱爲堆溢出的異常拋出。以下是我的排序功能代碼。排序數據Gridview
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);
}
}
}
感謝
你在通過爲strSortExpression什麼? – 2010-03-15 10:33:33
排序事件處理程序和此方法之間的關係是什麼? – 2010-03-15 10:36:12
strSortExpression包含要進行排序的字段,並且在事件處理程序中調用此方法 – 2010-03-15 10:44:38