asp.net The GridView ‘GridView1’ fired event PageIndexChanging which wasn’t handled


In my early days of developing websites using ASP.NET, i came across the following particular issue.
Whenever i enable paging in my gridview and run the application, the application says, ‘GridView1’ fired event PageIndexChanging which wasn’t handled. I found the following solution very useful.
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
DisplayGridView();
}

8 thoughts on “asp.net The GridView ‘GridView1’ fired event PageIndexChanging which wasn’t handled

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s