You probably declared the event handler for OnPageIndexChanged event incorrectly. Make sure that the event handler looks like the following.
<asp:DataGrid id='DataGrid1' runat='server'... OnPageIndexChanged='<EventName>'.../>
VB.NET
protected Sub <Eventname>(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs)
’...
end sub
C#
protected void <EventName>(object sender , System.Web.UI.WebControls.DataGridPageChangedEventArgs)
{
//...
}
Share with