//This is the GridView of all the items in the Table protected override void Fill() { try { gvData.EmptyDataText = Message.EMPTY_LIST; DataView dv = new DataView(GroupType.Items().Tables[0]); dv.Sort = (GridSortDirection == SortDirection.Ascending) ? GridSortExpression + " ASC" : GridSortExpression + " DESC"; gvData.PageSize = GridViewPageSize; gvData.PageIndex = PageIndex; ItemCount = dv.Table.Rows.Count; if (SetupPager()) { tablePager.Visible = true; } else { tablePager.Visible = false; } gvData.DataSource = dv; gvData.DataBind(); } catch (Exception ex) { SPA.Error.WriteError(ex); if (ShowDebug) { lblErrorMessage.Text = ex.ToString(); } } }