Skip to main content

DataPager.PageIndexChanging Event

Occurs before the active page is changed.

Namespace: DevExpress.Xpf.Editors.DataPager

Assembly: DevExpress.Xpf.Core.v14.2.dll

#Declaration

public event EventHandler<DataPagerPageIndexChangingEventArgs> PageIndexChanging

#Event Data

The PageIndexChanging event's handler receives an argument of the DataPagerPageIndexChangingEventArgs type. The following properties provide information specific to this event:

Property Description
IsCancel Gets or sets whether to cancel switching to a new page.
NewValue Gets the active page's index. Inherited from DataPagerPageIndexChangedEventArgs.
OldValue Gets the previously active page's index. Inherited from DataPagerPageIndexChangedEventArgs.

#Remarks

Before the active page is changed, the Data Pager fires the PageIndexChanging event, allowing the action to be changed by setting the event parameter's DataPagerPageIndexChangingEventArgs.IsCancel property to true. The indices of the previously and currently active pages can be obtained via the PageIndexChangingEventArgs.OldPageIndex and PageIndexChangingEventArgs.NewPageIndex properties, respectively.

After the active page has been changed, the DataPager.PageIndexChanged event is fired.

See Also