Back to Devexpress

ASPxDataViewBase.PageIndexChanging Event

aspnet-devexpress-dot-web-dot-aspxdataviewbase-bfa1b8b3.md

latest3.3 KB
Original Source

ASPxDataViewBase.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.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event DataViewPageEventHandler PageIndexChanging
vb
Public Event PageIndexChanging As DataViewPageEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
NewPageIndexGets 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 (DataViewPageEventArgs.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 DataViewPageEventArgs.NewPageIndex property returns -1.

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

See Also

PageIndex

PageIndexChanged

DataView

Image Gallery

News Control

ASPxDataViewBase Class

ASPxDataViewBase Members

DevExpress.Web Namespace