protected void dataBind(string sortExp, int pageIndex, FZGrid grid) { int totalRecords = 0; grid.PageSize = Utils.Configuration.PageSize; //List<T> list = IsManagerObject ? _contextManager.Search(SearchObject, Utils.Configuration.PageSize, pageIndex, out totalRecords, sortExp, grid.SortOrder) // : _context.Search(SearchObject, Utils.Configuration.PageSize, pageIndex, out totalRecords, sortExp, grid.SortOrder); List <T> list = _contextManager.Search(SearchObject, Utils.Configuration.PageSize, pageIndex, out totalRecords, sortExp, grid.SortOrder); grid.DataSource = list; grid.CustomCustomVirtualItemCount = totalRecords; grid.DataBind(); }
protected void clearBinding(FZGrid grid) { grid.DataSource = null; grid.DataBind(); }