Fires on the server side before the page index is changed and allows you to prevent a specific page from being selected.
public event DataViewPageEventHandler PageIndexChanging
Public Event PageIndexChanging As DataViewPageEventHandler
The PageIndexChanging event's data class is DataViewPageEventArgs. The following properties provide information specific to this event:
|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.|
The PageIndexChanging event fires before a specific page is selected. This occurs in the cases listed below:
- an end-user tries to switch between pages by clicking the numeric or navigation button;
- a new value has been assigned to the ASPxDataViewBase.PageIndex property in code.
- one of the client-side methods has been called to change an active page.
You can use the event parameter's properties to identify a new page index (DataViewPageEventArgs.NewPageIndex) or to cancel the operation by setting the Cancel property to true.
After the page index has been changed, the ASPxDataViewBase.PageIndexChanged event is raised.