I am developing a custom grid view control. with paging, searching, sorting now I need to write one common function for sorting, searching in different class file
In sorting i am trying to use this function
public SortDirection GridViewSortDirection
{
get
{
if (ViewState["sortDirection"] == null)
ViewState["sortDirection"] = SortDirection.Ascending;
return (SortDirection)ViewState["sortDirection"];
}
set { ViewState["sortDirection"] = value; }
}
but in c# class file we don't have a viewstate properties. So how can i solve this issue?
If I write one function common for sorting in a class file so that iI can use in all the pages of the gridview where sorting is required.
Any help on this issue would be great.
Thank you.