private void DetailsView_PageIndexChanging(object sender, DetailsViewPageEventArgs e) { //Set Page Index to New Page Index _detailsView.PageIndex = e.NewPageIndex; //Bind Details View DetailsView_DataBind(); }
protected virtual void OnPageIndexChanging (DetailsViewPageEventArgs e) { if (Events != null) { DetailsViewPageEventHandler eh = (DetailsViewPageEventHandler) Events [PageIndexChangingEvent]; if (eh != null) eh (this, e); } }
void ShowPage (int newIndex) { DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex); OnPageIndexChanging (args); if (!args.Cancel) { EndRowEdit (); PageIndex = args.NewPageIndex; OnPageIndexChanged (EventArgs.Empty); } }
protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e) { DetailsView1.ChangeMode(DetailsViewMode.ReadOnly); DetailsView1.PageIndex = e.NewPageIndex; if (GridView1.SelectedIndex >= 0) { sCedula = GridView1.SelectedValue.ToString(); BindDetailsView(sCedula); } else if (GridView1.EditIndex >= 0) { // Currently editing row of GridView is set to editingRow GridViewRow editingRow = GridView1.Rows[GridView1.EditIndex]; // TextBox control of TitleID column of currently editing row is set to // txtTitleID and its text is set to TitleID TextBox txtTitleID = (TextBox)editingRow.Cells[1].Controls[0]; sCedula = txtTitleID.Text; BindDetailsView(sCedula); } }
protected void DetailsView4_PageIndexChanging(object sender, DetailsViewPageEventArgs e) { }
void dv_PageIndexChanging (object sender, DetailsViewPageEventArgs e) { pageIndexChanging = true; newPageIndex = e.NewPageIndex; e.NewPageIndex = -1; }
protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e) { DetailsView1.PageIndex = e.NewPageIndex; BindData(); }
private void HandlePage(int newPage) { if (!AllowPaging) { return; } if (PageIndex < 0) { return; } DetailsViewPageEventArgs e = new DetailsViewPageEventArgs(newPage); OnPageIndexChanging(e); if (e.Cancel) { return; } if (IsDataBindingAutomatic) { if (e.NewPageIndex > -1) { // if the requested page is out of range and we're already on the last page, don't rebind if ((e.NewPageIndex >= PageCount && _pageIndex == PageCount - 1)) { return; } // DevDiv Bugs 188830: Don't clear key table if page is out of range, since control won't be rebound. _keyTable = null; _pageIndex = e.NewPageIndex; } else { return; } } OnPageIndexChanged(EventArgs.Empty); RequiresDataBinding = true; }
protected virtual void OnPageIndexChanging(DetailsViewPageEventArgs e) { bool isBoundUsingDataSourceID = base.IsBoundUsingDataSourceID; DetailsViewPageEventHandler handler = (DetailsViewPageEventHandler) base.Events[EventPageIndexChanging]; if (handler != null) { handler(this, e); } else if (!isBoundUsingDataSourceID && !e.Cancel) { throw new HttpException(System.Web.SR.GetString("DetailsView_UnhandledEvent", new object[] { this.ID, "PageIndexChanging" })); } }
protected override void OnPageIndexChanging(DetailsViewPageEventArgs e) { OldPageIndex = this.PageIndex; base.OnPageIndexChanged(e); if (e.NewPageIndex == this.PageCount - 1) { Object o = (this.Page.Master == null) ? this.Page.FindControl(this.DataSourceID) : this.Parent.FindControl(this.DataSourceID); if (o != null) { ((WebDataSource)o).GetNextPacket(); } } }
private void HandlePage(int newPage) { if (this.AllowPaging && (this.PageIndex >= 0)) { DetailsViewPageEventArgs e = new DetailsViewPageEventArgs(newPage); this.OnPageIndexChanging(e); if (!e.Cancel) { if (base.IsBoundUsingDataSourceID) { if (e.NewPageIndex <= -1) { return; } if ((e.NewPageIndex >= this.PageCount) && (this._pageIndex == (this.PageCount - 1))) { return; } this._keyTable = null; this._pageIndex = e.NewPageIndex; } this.OnPageIndexChanged(EventArgs.Empty); base.RequiresDataBinding = true; } } }
protected virtual new void OnPageIndexChanging(DetailsViewPageEventArgs e) { }
protected void dvAplicativoHomologado_PageIndexChanging(object sender, DetailsViewPageEventArgs e) { }
protected void dvCourseInfo_PageIndexChanging(object sender, System.Web.UI.WebControls.DetailsViewPageEventArgs e) { }
protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e) { if (!IsPostBack) ; }
/// <summary> /// 获取绑定分页控件对应控件的翻页事件Args /// </summary> /// <param name="controlMode"></param> /// <param name="eventName"></param> /// <param name="commandSource"></param> /// <param name="newPageIndex"></param> /// <returns></returns> /// <remarks> /// 获取绑定分页控件对应控件的翻页事件Args /// </remarks> public object GetPageEventArgs(DataListControlType controlMode, string eventName, object commandSource, int newPageIndex) { object obj = null; switch (controlMode) { case DataListControlType .GridView: switch (eventName) { case "EventPageIndexChanged": EventArgs gvEventArgs = new EventArgs(); obj = (object)gvEventArgs; break; case "EventPageIndexChanging": GridViewPageEventArgs gridViewEventArgs = new GridViewPageEventArgs(newPageIndex); obj = (object)gridViewEventArgs; break; } break; case DataListControlType .DeluxeGrid: switch (eventName) { case "EventPageIndexChanged": EventArgs gvEventArgs = new EventArgs(); obj = (object)gvEventArgs; break; case "EventPageIndexChanging": GridViewPageEventArgs gridViewEventArgs = new GridViewPageEventArgs(newPageIndex); obj = (object)gridViewEventArgs; break; } break; case DataListControlType .DetailsView: //DetailsViewPageEventArgs detailsViewEventArgs = new DetailsViewPageEventArgs(newPageIndex); //obj = (object)detailsViewEventArgs; switch (eventName) { case "EventPageIndexChanged": EventArgs detailsViewEventArgs = new EventArgs(); obj = (object)detailsViewEventArgs; break; case "EventPageIndexChanging": DetailsViewPageEventArgs dvEventArgs = new DetailsViewPageEventArgs(newPageIndex); obj = (object)dvEventArgs; break; } break; case DataListControlType .FormView: //DetailsViewPageEventArgs detailsViewEventArgs = new DetailsViewPageEventArgs(newPageIndex); //obj = (object)detailsViewEventArgs; switch (eventName) { case "EventPageIndexChanged": EventArgs formViewEventArgs = new EventArgs(); obj = (object)formViewEventArgs; break; case "EventPageIndexChanging": FormViewPageEventArgs fvEventArgs = new FormViewPageEventArgs(newPageIndex); obj = (object)fvEventArgs; break; } break; case DataListControlType .DataGrid: DataGridPageChangedEventArgs dataGridEventArgs = new DataGridPageChangedEventArgs(commandSource, newPageIndex); obj = (object)dataGridEventArgs; break; } return obj; }
/// <devdoc> /// <para>Raises the <see langword='ModeChanging'/> event.</para> /// </devdoc> protected virtual void OnPageIndexChanging(DetailsViewPageEventArgs e) { bool isBoundToDataSourceControl = IsDataBindingAutomatic; DetailsViewPageEventHandler handler = (DetailsViewPageEventHandler)Events[EventPageIndexChanging]; if (handler != null) { handler(this, e); } else { if (isBoundToDataSourceControl == false && e.Cancel == false) { throw new HttpException(SR.GetString(SR.DetailsView_UnhandledEvent, ID, "PageIndexChanging")); } } }
void ShowPage (int newIndex) { DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex); OnPageIndexChanging (args); if (args.Cancel || !IsBoundUsingDataSourceID) return; if (args.NewPageIndex < 0 || args.NewPageIndex >= PageCount) return; EndRowEdit (false); PageIndex = args.NewPageIndex; OnPageIndexChanged (EventArgs.Empty); }
static void d_PageIndexChanging (object sender, DetailsViewPageEventArgs e) { if (WebTest.CurrentTest.UserData == null) { ArrayList list = new ArrayList (); list.Add ("PageIndexChanging"); WebTest.CurrentTest.UserData = list; } else { ArrayList list = WebTest.CurrentTest.UserData as ArrayList; if (list == null) throw new NullReferenceException (); list.Add ("PageIndexChanging"); WebTest.CurrentTest.UserData = list; } }
protected virtual void OnPageIndexChanging (DetailsViewPageEventArgs e) { if (Events != null) { DetailsViewPageEventHandler eh = (DetailsViewPageEventHandler) Events [PageIndexChangingEvent]; if (eh != null) { eh (this, e); return; } } if (!IsBoundUsingDataSourceID) throw new HttpException (String.Format (unhandledEventExceptionMessage, ID, "PageIndexChanging")); }
public void DoOnPageIndexChanging (DetailsViewPageEventArgs e) { OnPageIndexChanging (e); }
protected virtual new void OnPageIndexChanging (DetailsViewPageEventArgs e) { Contract.Requires (e != null); }