protected void AspNetPagerAskAnswer_PageChanging(object src, PageChangingEventArgs e) { MsttGridview.PageIndex = e.NewPageIndex - 1; BindData(); AspNetPagerAskAnswer.CurrentPageIndex = e.NewPageIndex - 1; }
private void wizardControl1_PageChanging(object sender, PageChangingEventArgs e) { if (e.NewPage == WizardPage2 && e.CurrentPage == WizardPage3) { e.NewPage = WizardPage1; } else if (e.NewPage == WizardPage4 && e.CurrentPage == WizardPage5) { e.NewPage = WizardPage3; } else if (e.CurrentPage == WizardPage1 && e.NewPage == WizardPage2) { bool check = SearchSapFiles.Checked || SearchEtabsFiles.Checked || SearchSafeFiles.Checked || SearchLarsaFiles.Checked; if (!check) { MessageBox.Show(LocalizedStrings.SelectAnalysisFilesMessage, LocalizedStrings.AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); e.Cancel = true; } } else if (e.CurrentPage == WizardPage3 && e.NewPage == WizardPage4) { bool check = (SearchResultList.CheckedItems.Count > 0); if (!check) { MessageBox.Show(LocalizedStrings.SelectDeleteFilesMessage, LocalizedStrings.AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); e.Cancel = true; } else { e.Cancel = !(MessageBox.Show(LocalizedStrings.ConfirmDeleteMessage, LocalizedStrings.AppTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes); } } }
// Fires when the page is changed private void PagedResults_PageChanging(object sender, PageChangingEventArgs e) { // Don't do anything if the requested page's results have already been retrieved if (_pagesRetrieved.Contains(e.NewPageIndex)) { return; } // Set flag indicating that the ensuing search is due to the page being changed _pageChangeSearch = true; if (e.NewPageIndex == 0) // Should never be the case, but coding defensively here { _searchStartIndex = 1; } else { _searchStartIndex = e.NewPageIndex * _pageSize + 1; } // Add the requested page to the list of those that have been retrieved _pagesRetrieved.Add(e.NewPageIndex); // Request results for the page doSearch(_lastSearch); // Prevent the page from changing. Once the results are returned, it will be changed // programmatically e.Cancel = true; }
/// <summary> /// Raises the <see cref="E:PageChanging"/> event. /// </summary> /// <param name="args">The <see cref="System.ComponentModel.PageChangingEventArgs"/> instance containing the event data.</param> protected virtual void OnPageChanging(PageChangingEventArgs args) { if (null != PageChanging) { PageChanging(this, args); } }
protected void AspNetPager1_PageChanging(object src, PageChangingEventArgs e) { if (CheckBox1.Checked) { e.Cancel = true; } label1.Text = "PageChanging event fired,value of the NewPageIndex is " + e.NewPageIndex; }
protected void AspNetPager1_PageChanging(object src, PageChangingEventArgs e) { if (CheckBox1.Checked) { e.Cancel = true; } label1.Text = "PageChanging 事件被引发,NewPageIndex 的值是:" + e.NewPageIndex; }
/// <summary> /// Raises the PageChanging event /// </summary> /// <param name="e">PageChangingEventArgs instance used for the event</param> private void RaisePageChanging(PageChangingEventArgs e) { EventHandler <PageChangingEventArgs> handler = this.PageChanging; if (handler != null) { handler(this, e); } }
protected Task ChangePage(UIMouseEventArgs e, int pageNumber) { var arg = new PageChangingEventArgs() { NewPageNumber = pageNumber }; return(OnPageChanging.InvokeAsync(arg)); }
/// <summary> /// Raises a <see cref="PageChanging"/> event /// </summary> /// <param name="e">The event args</param> protected virtual void OnPageChanging(PageChangingEventArgs e) { EventHandler <PageChangingEventArgs> handler = this.PageChanging; if (handler != null) { handler(this, e); } }
protected virtual bool OnPageChanging(int newIndex) { PageChangingEventArgs e = new PageChangingEventArgs(newIndex); if (this.PageChanging != null) { this.PageChanging((object)this, e); } return(e.Cancel); }
private bool OnPageChanging(int newPageIndex) { PageChangingEventArgs e = new PageChangingEventArgs(newPageIndex); if (this.PageChanging != null) { this.PageChanging(this, e); } return(e.Cancel); }
/// <summary> /// 分页 /// </summary> /// <param name="src"></param> /// <param name="e"></param> protected void anp_top_PageChanging(object src, PageChangingEventArgs e) { Control controlGrid = Page.FindControl("anp_top"); if (controlGrid != null) { AspNetPager Grid = (AspNetPager)controlGrid; Grid.CurrentPageIndex = e.NewPageIndex; BindGridView(); } }
//# region 分页控件 页码changing事件 protected void pager_PageChanging(object src, PageChangingEventArgs e) { pager.CurrentPageIndex = e.NewPageIndex; pager.RecordCount = totalCount; pageIndex = pager.CurrentPageIndex; ViewState["pageIndex"] = pageIndex; hdnRowIndex.Value = "0"; GridDataBind(); this.lblBillNo.Text = dsMaster.Tables[0].Rows[0]["BILLNO"].ToString(); LoadBill(this.lblBillNo.Text); }
/// <summary> /// 页码改变事件 /// </summary> /// <param name="src"></param> /// <param name="e"></param> protected void AspNetPager1_PageChanging(object src, PageChangingEventArgs e) { AspNetPager1.CurrentPageIndex = e.NewPageIndex; //重新设定分页展示的当前页码为多少 /* * 当我们以后如果有点击下一页的时候文本框当中的值,刷新,消失了的时候,我们需要在这给文本框重新赋值,赋的是之前输入的内容 * this.txtKeyWords.Text = XXXX; */ //下面的是绑定数据源 GetRoles(this.txtKeyWords.Text); }
protected void NetPagerParameter_PageChanging(object src, PageChangingEventArgs e) { this.NetPagerParameter.CurrentPageIndex = e.NewPageIndex; string intGoodsClass = this.tvGoodsClass.SelectedValue; string strSql = this.QueryCondition(); if (intGoodsClass != "0" && intGoodsClass != "") { strSql += string.Format(" and GoodsClassID in ({0}) ", PubFunction.GetClassID(Convert.ToInt32(intGoodsClass))); } this.Get_ParameterList(strSql); }
/// <summary> /// Begins a page move by raising events and updating state before calling /// <see cref="BeginMoveToPageCore"/>. /// </summary> /// <remarks> /// Every successful call to <see cref="BeginMoveToPage"/> should be matched by a call /// to <see cref="EndMoveToPage"/> when the page move is complete. /// </remarks> /// <param name="pageIndex">The index of the page to move to</param> /// <returns><c>true</c> if the operation was successful; otherwise, <c>false</c>.</returns> protected bool BeginMoveToPage(int pageIndex) { PageChangingEventArgs e = new PageChangingEventArgs(pageIndex); this.OnPageChanging(e); // re-entrant if (e.Cancel) { return(false); } this.IsPageChanging = true; // re-entrant this.BeginMoveToPageCore(pageIndex); return(true); }
/// <summary> /// Moves to the page at the specified index. /// </summary> /// <param name="pageIndex">The index of the page to move to.</param> /// <returns> /// true if the operation was successful; otherwise, false. /// </returns> public bool MoveToPage(int pageIndex) { if (pageIndex < -1) { return(false); } if ((pageIndex == -1) && (this.PageSize > 0)) { return(false); } if ((pageIndex >= this.PageCount) || (this._pageIndex == pageIndex)) { return(false); } // try { IsPageChanging = true; if (null != PageChanging) { PageChangingEventArgs args = new PageChangingEventArgs(pageIndex); OnPageChanging(args); if (args.Cancel) { return(false); } } // _pageIndex = pageIndex; Refresh(); IsPageChanging = false; OnPropertyChanged("PageIndex"); OnPageChanged(EventArgs.Empty); return(true); } finally { IsPageChanging = false; } }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="OnLoad"]/*'/> protected override void OnLoad(EventArgs e) { if (UrlPaging) { currentUrl = Page.Request.Path; urlParams = Page.Request.QueryString; if (!Page.IsPostBack && cloneFrom == null) { string pageIndex = Page.Request.QueryString[UrlPageIndexName]; int index = 1; if (!string.IsNullOrEmpty(pageIndex)) { try { index = int.Parse(pageIndex); } catch { } } PageChangingEventArgs args = new PageChangingEventArgs(index); OnPageChanging(args); } } else { inputPageIndex = Page.Request.Form[this.UniqueID + "_input"]; } base.OnLoad(e); }
protected void pager_PageChanging(object src, PageChangingEventArgs e) { pageIndex = e.NewPageIndex; BindData(); }
private void CurPagingBar_PageChanging(object src, PageChangingEventArgs e) { }
protected void AspNetPager1_PageChanging(object src, PageChangingEventArgs e) { //AspNetPager1.CurrentPageIndex = e.NewPageIndex; //GetBind(); }
protected void NetPagerParameter_PageChanging(object src, PageChangingEventArgs e) { this.NetPagerParameter.CurrentPageIndex = e.NewPageIndex; this.bindrpt(); }
protected override void OnPageChanging(PageChangingEventArgs e) { base.OnPageChanging(e); Log(Color.DarkGreen, "Page Changing: {0} -> {1}", PageName(e.CurrentPage), PageName(e.NewPage)); }
protected void NetPagerParameter_PageChanging(object src, PageChangingEventArgs e) { this.NetPagerParameter.CurrentPageIndex = e.NewPageIndex; this.Get_ParameterList(this.QueryCondition()); }
protected void pagerDetail_PageChanging(object src, PageChangingEventArgs e) { detailPageIndex = e.NewPageIndex; BindDetailData(); }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="OnPageChanging"]/*'/> protected virtual void OnPageChanging(PageChangingEventArgs e) { PageChangingEventHandler handler = (PageChangingEventHandler)base.Events[AspNetPager.EventPageChanging]; if (handler != null) { handler(this, e); if (!e.Cancel || UrlPaging) //there's no way we can obtain the last value of the CurrentPageIndex in UrlPaging mode, so it doesn't make sense to cancel PageChanging event in UrlPaging mode { CurrentPageIndex = e.NewPageIndex; OnPageChanged(EventArgs.Empty); } } else { CurrentPageIndex = e.NewPageIndex; OnPageChanged(EventArgs.Empty); } }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="OnLoad"]/*'/> protected override void OnLoad(EventArgs e) { ClientScriptManager cs = Page.ClientScript; Type ctype = this.GetType(); if (UrlPaging) { currentUrl = Page.Request.Path; urlParams = Page.Request.QueryString; if (!Page.IsPostBack && cloneFrom == null) { string pageIndex = Page.Request.QueryString[UrlPageIndexName]; string pageSize = Page.Request.QueryString[urlPageSize];//TODO:add by chengang 2007-01-18 int index = 1; if (!string.IsNullOrEmpty(pageIndex)) { try { if (pageSize != null && pageSize != "") this.PageSize = Convert.ToInt32(pageSize);//TODO:add by chengang 2007-01-18 index = int.Parse(pageIndex); } catch { } } PageChangingEventArgs args = new PageChangingEventArgs(index, this.PageSize); OnPageChanging(args); } } else { inputPageIndex = Page.Request.Form[this.UniqueID + "_input"]; selectPageSize = Page.Request.Form[this.UniqueID + "_select"];//TODO:add by chengang 2007-01-18 } selectPageSize = Page.Request.Form[this.UniqueID + "_select"] == null ? this.PageSize.ToString() : Page.Request.Form[this.UniqueID + "_select"]; this.PageSize = Convert.ToInt32(selectPageSize);//TODO:add by chengang 2007-01-18 base.OnLoad(e); }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="RaisePostBackEvent"]/*'/> public void RaisePostBackEvent(string args) { int pageIndex = CurrentPageIndex; try { if (args == null || args == "") args = inputPageIndex; if (selectPageSize != null && selectPageSize.Trim().Length > 0)//TODO:add by chengang 2007-01-18 this.PageSize = Convert.ToInt32(selectPageSize); pageIndex = int.Parse(args); } catch { } PageChangingEventArgs pcArgs = new PageChangingEventArgs(pageIndex, this.PageSize); if (cloneFrom != null) { cloneFrom.OnPageChanging(pcArgs); } else { OnPageChanging(pcArgs); } }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="RaisePostBackEvent"]/*'/> public void RaisePostBackEvent(string args) { int pageIndex = CurrentPageIndex; try { if (args == null || args == "") args = inputPageIndex; pageIndex = int.Parse(args); } catch { } PageChangingEventArgs pcArgs = new PageChangingEventArgs(pageIndex); if (cloneFrom != null) { cloneFrom.OnPageChanging(pcArgs); } else { OnPageChanging(pcArgs); } }
protected void AspNetPager1_PageChanging(object src, PageChangingEventArgs e) { AspNetPager1.CurrentPageIndex = e.NewPageIndex; this.PageIndex = e.NewPageIndex; this.InitData(); }
protected void NetPagerParameter_PageChanging(object src, PageChangingEventArgs e) { this.NetPagerParameter.CurrentPageIndex = e.NewPageIndex; this.BindShopList(this.GetSearch()); }
private bool RaisePageChanging(int newPageIndex) { EventHandler<PageChangingEventArgs> pageChanging = this.PageChanging; if (pageChanging != null) { PageChangingEventArgs e = new PageChangingEventArgs(newPageIndex); pageChanging(this, e); return e.Cancel; } return false; }
protected void pager_PageChanging(object src, PageChangingEventArgs e) { pager.CurrentPageIndex = e.NewPageIndex; pager.RecordCount = totalCount; pageIndex = pager.CurrentPageIndex; ViewState["pageIndex"] = pageIndex; GridDataBind(); }
protected void pager_PageChanging(object src, PageChangingEventArgs e) { btnCanel.ToolTip = e.NewPageIndex.ToString(); pageIndex = e.NewPageIndex; BindData(); }
protected void NetPagerParameter_PageChanging(object src, PageChangingEventArgs e) { this.NetPagerParameter.CurrentPageIndex = e.NewPageIndex; this.Get_SysNoticeList(); }
protected void AspNetPager1_OnPageChanging(object src, PageChangingEventArgs e) { AspNetPager1.CurrentPageIndex = e.NewPageIndex; Bind(this.txtSearch.Text); }
// protected void AspNetAdmin_PageChanged(object sender, PageChangingEventArgs e) { DisplayData(e.NewPageIndex, AspNetAdmin.PageSize); }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="OnLoad"]/*'/> protected override void OnLoad(EventArgs e) { if (UrlPaging) { currentUrl = Page.Request.Path; queryString = Page.Request.ServerVariables["Query_String"]; if (!string.IsNullOrEmpty(queryString)&&queryString.StartsWith("?")) //mono <v2.8 compatible queryString = queryString.TrimStart('?'); if (!Page.IsPostBack && cloneFrom == null) { int index; int.TryParse(Page.Request.QueryString[UrlPageIndexName], out index); if (index <= 0) index = 1; else if (ReverseUrlPageIndex) index = PageCount - index + 1; PageChangingEventArgs args = new PageChangingEventArgs(index); OnPageChanging(args); } } else { inputPageIndex = Page.Request.Form[UniqueID + "_input"]; } base.OnLoad(e); if ((UrlPaging || (!UrlPaging && PageIndexBoxType == PageIndexBoxType.TextBox)) && (ShowPageIndexBox == ShowPageIndexBox.Always || (ShowPageIndexBox == ShowPageIndexBox.Auto && PageCount >= ShowBoxThreshold))) { HttpContext.Current.Items[scriptRegItemName] = true; } }
/// <summary> /// Handles <see cref="IPagedCollectionView.PageChanging"/> events raised by the <see cref="PagedCollectionView"/> /// </summary> /// <param name="sender">The <see cref="PagedCollectionView"/></param> /// <param name="e">The event args</param> protected virtual void OnPagedCollectionViewPageChanging(object sender, PageChangingEventArgs e) { this.OnPageChanging(e); }
/// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="OnLoad"]/*'/> protected override void OnLoad(EventArgs e) { if (UrlPaging) { currentUrl = Page.Request.Path; queryString = Page.Request.ServerVariables["Query_String"]; if (!Page.IsPostBack && cloneFrom == null) { int index; int.TryParse(Page.Request.QueryString[UrlPageIndexName],out index); if (index <= 0) index = 1; else if(ReverseUrlPageIndex) index = PageCount - index + 1; PageChangingEventArgs args = new PageChangingEventArgs(index); OnPageChanging(args); } } else { inputPageIndex = Page.Request.Form[UniqueID + "_input"]; } base.OnLoad(e); }