public void InitializeGridPager(string singleItemLabel, string multipleItemLabel, GridView grid, GetRecordCountMethodDelegate recordCount, ImageServerConstants.GridViewPagerPosition position) { _position = position; ItemName = singleItemLabel; PluralItemName = multipleItemLabel; Target = grid; GetRecordCountMethod = recordCount; Target.DataBound += DataBoundHandler; }
public void InitializeGridPager(string singleItemLabel, string multipleItemLabel, GridView grid, GetRecordCountMethodDelegate recordCount, ImageServerConstants.GridViewPagerPosition position) { _position = position; ItemName = singleItemLabel; PluralItemName = multipleItemLabel; Target = grid; GetRecordCountMethod = recordCount; // TODO: add this code so that the pager is updated automatically whenever the grid is updated // Target.DataBound += delegate { GridPagerTop.Refresh(); }; // // Becareful though, because the pager is calling Databind() in Page_Load(), // some pages may be end up in an infinite loop with this change. }