Example #1
0
        protected override void CreateControlHierarchy(bool useDataSource)
        {
            if (useDataSource)
            {
                if (!AllowCustomPaging)
                {
                    VirtualItemCount = PagedDataSource.DataSourceCount;
                }
            }
            else if (PagedDataSource.DataSource == null)
            {
                PagedDataSource.DataSource = new DummyDataSource(VirtualItemCount);                
            }
            
            ClearPagers();

            for (int i = 0; i < PagerStyle.PagersCount; i++)
            {
                Pager pager = new Pager(PagedDataSource, PagerStyle);
                mPagers.Add(pager);
                InitializePager(pager);
            }

            base.CreateControlHierarchy(useDataSource);
        }
Example #2
0
 protected override void InitializePager(DataGridItem item, int columnSpan, PagedDataSource pagedDataSource)
 {
     PagedDataSource = pagedDataSource;
     Pager Pager = new Pager(pagedDataSource, columnSpan, PagerStyle);
     Pager.PageIndexChanged += new DataGridPageChangedEventHandler(Pager_PageIndexChanged);
     Pager.First = First;
     item.Cells.Add(Pager.Navigator);
     Pagers.Add(Pager);
 }
Example #3
0
        protected void InitializePager(Pager pager)
        {
            pager.PagedDataSource = PagedDataSource;
            pager.PageIndexChanged += new DataGridPageChangedEventHandler(Pager_PageIndexChanged);
            pager.First = First;

            DataListItem item = new DataListItem(0, ListItemType.Pager);
            item.Controls.Add(pager.Navigator);
            Controls.Add(item);

            mPagerListItems.Add(item);
        }