protected void EmployeesFormView_PageIndexChanging(
     object sender, FormViewPageEventArgs e)
 {
     this.EmployeesFormView.PageIndex = e.NewPageIndex;
     this.EmployeesFormView.DataSource = this.employees;
     this.EmployeesFormView.DataBind();
 }
        protected void FormViewCustomer_PageIndexChanging(
			object sender, FormViewPageEventArgs e)
        {
            this.FormViewCustomer.PageIndex = e.NewPageIndex;
            this.FormViewCustomer.DataSource = this.customers;
            this.FormViewCustomer.DataBind();
        }
        /// <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 void FormViewSoddisfazione_PageIndexChanging(object sender, FormViewPageEventArgs e)
        {

        }
		protected virtual void OnPageIndexChanging (FormViewPageEventArgs e)
		{
			if (Events != null) {
				FormViewPageEventHandler eh = (FormViewPageEventHandler) Events [PageIndexChangingEvent];
				if (eh != null) eh (this, e);
			}
		}
			protected override void OnPageIndexChanging (FormViewPageEventArgs e) {
				OnPageIndexChangingCalled = true;
				base.OnPageIndexChanging (e);
			}
		static void d_PageIndexChanging (object sender, FormViewPageEventArgs 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 void frmViewPersonale_PageIndexChanging(object sender, FormViewPageEventArgs e)
        {

        }
 protected void FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)
 {
     FormView1.PageIndex = e.NewPageIndex;
     GetData();
    
 }
 protected void FormViewEmployees_PageIndexChanging(object sender, FormViewPageEventArgs e)
 {
     this.FormView_Customers.PageIndex = e.NewPageIndex;
     this.FormView_Customers.DataSource = DataGenerator.GetData();
     this.FormView_Customers.DataBind();
 }
Beispiel #11
0
 protected void EmployeesFormView_PageIndexChanging(object sender, FormViewPageEventArgs e)
 {
     this.EmployeesFormView.PageIndex = e.NewPageIndex;
     this.EmployeesFormView.DataSource = new NorthwindEntities().Employees.ToList();
     this.EmployeesFormView.DataBind();
 }
 protected virtual new void OnPageIndexChanging(FormViewPageEventArgs e)
 {
 }
Beispiel #13
0
        /// <devdoc>
        /// <para>Raises the <see langword='ModeChanging'/> event.</para>
        /// </devdoc>
        protected virtual void OnPageIndexChanging(FormViewPageEventArgs e) {
            bool isBoundToDataSourceControl = IsDataBindingAutomatic;

            FormViewPageEventHandler handler = (FormViewPageEventHandler)Events[EventPageIndexChanging];
            if (handler != null) {
                handler(this, e);
            } else {
                if (isBoundToDataSourceControl == false && e.Cancel == false) {
                    throw new HttpException(SR.GetString(SR.FormView_UnhandledEvent, ID, "PageIndexChanging"));
                }
            }
        }
Beispiel #14
0
        private void HandlePage(int newPage) {
            if (!AllowPaging) {
                return;
            }

            if (PageIndex < 0) {
                return;
            }

            FormViewPageEventArgs e = new FormViewPageEventArgs(newPage);
            OnPageIndexChanging(e);

            if (e.Cancel) {
                return;
            }

            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 the page is out of range, since control won't be rebound.
                _keyTable = null;
                _pageIndex = e.NewPageIndex;
            }
            else {
                return;
            }

            OnPageIndexChanged(EventArgs.Empty);
            RequiresDataBinding = true;
        }
Beispiel #15
0
        // FormView.PageIndexChanging事件
        protected void fvPerson_PageIndexChanging(object sender, FormViewPageEventArgs e)
        {
            // 设定新显示页面的索引.
            fvPerson.PageIndex = e.NewPageIndex;

            // 重新绑定FormView控件,显示新页面的数据.
            BindFormView();
        }
 protected void FormViewEmployee_OnPageIndexChanged(object sender, FormViewPageEventArgs e)
 {
     this.FormViewEmployee.PageIndex = e.NewPageIndex;
 }
Beispiel #17
0
 protected void FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)
 {
     MultiView1.ActiveViewIndex = 0;
 }
 protected virtual new void OnPageIndexChanging(FormViewPageEventArgs e)
 {
 }
Beispiel #19
0
 protected override void OnPageIndexChanging(FormViewPageEventArgs e)
 {
     OldPageIndex = this.PageIndex;
     base.OnPageIndexChanging(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();
         }
     }
 }
Beispiel #20
0
		void SetPageIndex (int index)
		{
			FormViewPageEventArgs args = new FormViewPageEventArgs (index);
			OnPageIndexChanging (args);

			if (args.Cancel || !IsBoundUsingDataSourceID)
				return;

			int newIndex = args.NewPageIndex;
			if (newIndex < 0 || newIndex >= PageCount)
				return;
			EndRowEdit (false, false);
			PageIndex = newIndex;
			OnPageIndexChanged (EventArgs.Empty);
		}
		private void fv_PageIndexChanging (object sender, FormViewPageEventArgs e)
		{
			pageIndexChanging = true;
			newPageIndex = e.NewPageIndex;
			e.NewPageIndex = -1;
		}
Beispiel #22
0
		protected virtual void OnPageIndexChanging (FormViewPageEventArgs e)
		{
			if (Events != null) {
				FormViewPageEventHandler eh = (FormViewPageEventHandler) Events [PageIndexChangingEvent];
				if (eh != null) {
					eh (this, e);
					return;
				}
			}
			if (!IsBoundUsingDataSourceID)
				throw new HttpException (String.Format (unhandledEventExceptionMessage, ID, "PageIndexChanging"));
		}
			public void DoOnPageIndexChanging (FormViewPageEventArgs e)
			{
				OnPageIndexChanging (e); 
			}
        protected void ProductFormView_PageIndexChanging(object sender, FormViewPageEventArgs e)
        {

        }
        protected void FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)
        {

        }
		void ShowPage (int newIndex)
		{
			FormViewPageEventArgs args = new FormViewPageEventArgs (newIndex);
			OnPageIndexChanging (args);
			if (!args.Cancel) {
				EndRowEdit ();
				PageIndex = args.NewPageIndex;
				OnPageIndexChanged (EventArgs.Empty);
			}
		}