Hi
I am using a RadGrid control on my web page (search page) which allow user to filter columns. inside my RadGrid I have a link which redirects user to another page and user can back to the search page again.
I was wondering is there any way that I can store the RadGrid's filter condition in a place like session and restore all of them when user is back to visit the page.
I used the following code but it just returns the string ,it didn't set the filter column with their search value in RadGrid.
Thanks,
I am using a RadGrid control on my web page (search page) which allow user to filter columns. inside my RadGrid I have a link which redirects user to another page and user can back to the search page again.
I was wondering is there any way that I can store the RadGrid's filter condition in a place like session and restore all of them when user is back to visit the page.
I used the following code but it just returns the string ,it didn't set the filter column with their search value in RadGrid.
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| if (Session["RadGridFilterConditions"] != null) |
| { |
| RadGrid1.MasterTableView.FilterExpression = Session["RadGridFilterConditions"].ToString(); |
| RadGrid1.DataBind(); |
| } |
| } |
| } |
| protected void Page_PreRender(object sender, EventArgs e) |
| { |
| Session["RadGridFilterConditions"] = RadGrid1.MasterTableView.FilterExpression; |
| } |
Thanks,