public PageNumberLinkTemplate(PagingControl ctlPagingControl) { _PagingControl = ctlPagingControl; }
private void InitializePaging( PagingControl ctlPagingControl, int TotalRecords, int PageSize ) { ctlPagingControl.TotalRecords = TotalRecords; ctlPagingControl.PageSize = PageSize; ctlPagingControl.CurrentPage = PageIndex; string strQuerystring = ""; if( ddlRecordsPerPage.SelectedIndex != 0 ) { strQuerystring += "&PageRecords=" + ddlRecordsPerPage.SelectedValue; } if( intPortalID >= 0 ) { strQuerystring += "&PortalID=" + intPortalID.ToString(); } if( strLogTypeKey != "*" && !String.IsNullOrEmpty(strLogTypeKey) ) { strQuerystring += "&LogTypeKey=" + strLogTypeKey; } ctlPagingControl.QuerystringParams = strQuerystring; ctlPagingControl.TabID = TabId; }
private void InitializePaging(PagingControl ctlPagingControl, int totalRecords, int pageSize) { ctlPagingControl.TotalRecords = totalRecords; ctlPagingControl.PageSize = pageSize; ctlPagingControl.CurrentPage = _pageIndex; var querystring = ""; if (ddlRecordsPerPage.SelectedIndex != 0) { querystring += "&PageRecords=" + ddlRecordsPerPage.SelectedValue; } if (_portalId >= 0) { querystring += "&pid=" + _portalId; } if (_logTypeKey != "*" && !String.IsNullOrEmpty(_logTypeKey)) { querystring += "&LogTypeKey=" + _logTypeKey; } ctlPagingControl.QuerystringParams = querystring; ctlPagingControl.TabID = TabId; ctlPagingControl.Visible = true; }
/// <summary> /// Sets up a DNN <see cref="PagingControl"/>. /// </summary> /// <param name="pagingControl">The pager control.</param> /// <param name="totalRecords">The total records.</param> /// <param name="queryStringKeys">The QueryString keys which should be persisted when the paging links are clicked.</param> protected void SetupPagingControl(PagingControl pagingControl, int totalRecords, params string[] queryStringKeys) { if (pagingControl == null) { throw new ArgumentNullException("pagingControl", "pagingControl must not be null"); } pagingControl.Visible = totalRecords != 0; pagingControl.TotalRecords = totalRecords; pagingControl.CurrentPage = this.CurrentPageIndex; pagingControl.TabID = this.TabId; pagingControl.QuerystringParams = GenerateQueryStringParameters(this.Request, queryStringKeys); }