System.Web.UI.WebControls.GridView.InitializePager C# (CSharp) Method

InitializePager() protected method

protected InitializePager ( GridViewRow row, int columnSpan, PagedDataSource dataSource ) : void
row GridViewRow
columnSpan int
dataSource PagedDataSource
return void
		protected virtual void InitializePager (GridViewRow row, int columnSpan, PagedDataSource dataSource)
		{
			TableCell cell = new TableCell ();
			if (columnSpan > 1)
				cell.ColumnSpan = columnSpan;
			
			if (pagerTemplate != null)
				pagerTemplate.InstantiateIn (cell);
			else
				cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
			
			row.Cells.Add (cell);
		}