コード例 #1
0
        private void DetailsView_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
        {
            //Set Page Index to New Page Index
            _detailsView.PageIndex = e.NewPageIndex;

            //Bind Details View
            DetailsView_DataBind();
        }
コード例 #2
0
		protected virtual void OnPageIndexChanging (DetailsViewPageEventArgs e)
		{
			if (Events != null) {
				DetailsViewPageEventHandler eh = (DetailsViewPageEventHandler) Events [PageIndexChangingEvent];
				if (eh != null) eh (this, e);
			}
		}
コード例 #3
0
		void ShowPage (int newIndex)
		{
			DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex);
			OnPageIndexChanging (args);
			if (!args.Cancel) {
				EndRowEdit ();
				PageIndex = args.NewPageIndex;
				OnPageIndexChanged (EventArgs.Empty);
			}
		}
コード例 #4
0
ファイル: UsuarioB.aspx.cs プロジェクト: LICSU/SistemaViejo
        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)
 {
 }
コード例 #6
0
		void dv_PageIndexChanging (object sender, DetailsViewPageEventArgs e)
		{
			pageIndexChanging = true;
			newPageIndex = e.NewPageIndex;
			e.NewPageIndex = -1;
		}
コード例 #7
0
ファイル: Index.aspx.cs プロジェクト: tca85/ASP.NET
 protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
 {
     DetailsView1.PageIndex = e.NewPageIndex;
     BindData();
 }
コード例 #8
0
ファイル: DetailsView.cs プロジェクト: uQr/referencesource
        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;
        }
コード例 #9
0
 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" }));
     }
 }
コード例 #10
0
ファイル: WebDetailsView.cs プロジェクト: san90279/UK_OAS
 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();
         }
     }
 }
コード例 #11
0
 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;
         }
     }
 }
コード例 #12
0
 protected virtual new void OnPageIndexChanging(DetailsViewPageEventArgs e)
 {
 }
コード例 #13
0
 protected void dvAplicativoHomologado_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
 {
 }
コード例 #14
0
 protected void dvCourseInfo_PageIndexChanging(object sender, System.Web.UI.WebControls.DetailsViewPageEventArgs e)
 {
 }
コード例 #15
0
 protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
 {
     if (!IsPostBack) ;
 }
コード例 #16
0
        /// <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; 
        }
 protected virtual new void OnPageIndexChanging(DetailsViewPageEventArgs e)
 {
 }
コード例 #18
0
ファイル: DetailsView.cs プロジェクト: uQr/referencesource
        /// <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"));
                }
            }
        }
コード例 #19
0
		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);
		}
コード例 #20
0
		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;
			}
		}
コード例 #21
0
		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"));
		}
コード例 #22
0
			public void DoOnPageIndexChanging (DetailsViewPageEventArgs e)
			{
				OnPageIndexChanging (e);
			}
 protected virtual new void OnPageIndexChanging (DetailsViewPageEventArgs e)
 {
   Contract.Requires (e != null);
 }