aspnet-devexpress-dot-web-dot-aspxgridbase-5cf9d531.md
Fires after the selected page has been changed.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public event EventHandler PageIndexChanged
Public Event PageIndexChanged As EventHandler
The PageIndexChanged event's data class is EventArgs.
The PageIndexChanged event fires after an end-user has switched between pages by clicking the pager’s numeric or navigation button.
Note
End-users can switch the control to the ShowAllRows mode by clicking the All item in the page size item dropdown window, or by clicking the All navigation button. In this case, the PageIndexChanged event fires and the ASPxGridBase.PageIndex property returns -1.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" OnPageIndexChanged="ASPxGridView1_PageIndexChanged"
DataSourceID="SqlDataSource1" KeyFieldName="ProductID">
<Columns>
...
</Columns>
<SettingsPager Mode="ShowPager" PageSize="4" />
</dx:ASPxGridView>
protected void ASPxGridView1_PageIndexChanged(object sender, EventArgs e)
{
// your code
}
See Also