Adf.Web.BusinessGridViewPager.HandleService C# (CSharp) Method

HandleService() public method

Sets the new page as the current page of the specified SmartView.
public HandleService ( GridAction action, SmartView view ) : void
action GridAction The 'Paging' to perform.
view SmartView The , the current page of /// which is to set.
return void
        public void HandleService(GridAction action, SmartView view, params object[] p)
        {
            if (view == null) return;
            if (!view.AllowPaging) return;
            if (action != GridAction.Paging) return;

            GridViewPageEventArgs args = p[0] as GridViewPageEventArgs;
            if (args == null) return;

            view.PageIndex = args.NewPageIndex;
            view.SelectedIndex = -1;
            view.DataBind();
        }