Tab
A newer version of this page is available. Switch to the current version.

ASPxPagerBase.PageIndexChanging Event

Fires on the server side before the page index is changed and allows you to prevent a specific page from being selected.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public event PagerPageEventHandler PageIndexChanging
Public Event PageIndexChanging As PagerPageEventHandler

Event Data

The PageIndexChanging event's data class is PagerPageEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
NewPageIndex Gets or sets the selected page's index.

Remarks

The PageIndexChanging event fires before a specific page is selected. This occurs in the cases listed below:

You can use the event parameter's properties to identify a new page index (PagerPageEventArgs.NewPageIndex) or to cancel the operation by setting the Cancel property to true.

NOTE

If an end-user clicks the All item in the page size item dropdown, or the All navigation button, the PagerPageEventArgs.NewPageIndex property returns -1.

After the page index has been changed, the ASPxPagerBase.PageIndexChanged event is raised.

See Also