/// <summary>
/// Restores the state of the grid view and grid view search panel.
/// </summary>
/// <param name="gridView">The grid view.</param>
/// <param name="searchPanel">The search panel.</param>
public void RestoreState( ref GridView gridView, ref GridViewSearchPanel searchPanel )
{
gridView.PageIndex = this.PageIndex;
gridView.PageSize = this.PageSize;
searchPanel.SearchFieldName = this.SearchFieldName;
searchPanel.SearchKeyword = this.SearchKeyword;
searchPanel.SearchOperator = this.SearchOperator;
searchPanel.Filter = this.Filter;
if (!string.IsNullOrEmpty(this.SortExpression))
{
gridView.Sort(this.SortExpression, this.SortDirection);
}
}