header change on sort [modified]
-
Hi i want to change the header on sort for example when i click the header of grid pax_name it schould change to pax_name(ASC) and so on Descending pax_name(Desc) i write code int he sortcommand event of the datagrid by using viewstate. Bind(); if(ViewState["SortOrder"].ToString() == "" || ViewState["SortOrder"].ToString() == "DESC") { dv.Sort = e.SortExpression; ViewState["SortExpression"]= e.SortExpression + "ASC"; ViewState["SortOrder"] = "ASC"; } else { dv.Sort = e.SortExpression + " DESC"; ViewState["SortExpression"]= e.SortExpression + " DESC"; ViewState["SortOrder"] = "DESC"; } dgHistory.DataBind(); -- modified at 3:20 Tuesday 24th April, 2007
-
Hi i want to change the header on sort for example when i click the header of grid pax_name it schould change to pax_name(ASC) and so on Descending pax_name(Desc) i write code int he sortcommand event of the datagrid by using viewstate. Bind(); if(ViewState["SortOrder"].ToString() == "" || ViewState["SortOrder"].ToString() == "DESC") { dv.Sort = e.SortExpression; ViewState["SortExpression"]= e.SortExpression + "ASC"; ViewState["SortOrder"] = "ASC"; } else { dv.Sort = e.SortExpression + " DESC"; ViewState["SortExpression"]= e.SortExpression + " DESC"; ViewState["SortOrder"] = "DESC"; } dgHistory.DataBind(); -- modified at 3:20 Tuesday 24th April, 2007