Tab

ASPxPagerBase.PageSizeChanging Event

Fires on the server side before the page size (number of items per page) is changed and allows you to cancel the action.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public event PagerPageSizeEventHandler PageSizeChanging

Event Data

The PageSizeChanging event's data class is PagerPageSizeEventArgs. 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.
NewPageSize Gets or sets the new page size (number of items displayed on a page).

Remarks

End-users can change the page size (the number of items displayed on a page) using the page size item element. The PageSizeChanging event allows you to perform any custom actions before the page size is changed. You can use the event parameter’s properties to identify a new page size (PagerPageSizeEventArgs.NewPageSize) 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 PagerPageSizeEventArgs.NewPageSize property returns the previous numerical value.

After the page size has been changed, the ASPxPagerBase.PageSizeChanged event is raised.

See Also