Back to Devexpress

ASPxPagerBase.PageSizeChanging Event

aspnet-devexpress-dot-web-dot-aspxpagerbase-3e8670b8.md

latest2.9 KB
Original Source

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

NuGet Package : DevExpress.Web

Declaration

csharp
public event PagerPageSizeEventHandler PageSizeChanging
vb
Public Event PageSizeChanging As PagerPageSizeEventHandler

Event Data

The PageSizeChanging event's data class is PagerPageSizeEventArgs. 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.
NewPageSizeGets 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

PageSizeChanged

Pager Elements

Pager

ASPxPagerBase Class

ASPxPagerBase Members

DevExpress.Web Namespace