Home > Categories > asp.net The GridView ‘GridView1′ fired event PageIndexChanging which wasn’t handled

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();
}
  1. June 15, 2011 at 1:12 PM

    Hi,

    This is very useful…..

    Thanks,,

  2. muhil
    December 26, 2011 at 8:49 PM

    really simple and super…

  3. kennyskyron@yahoo.co.uk
    February 17, 2012 at 9:17 PM

    thanks alot, been of help to me.

  4. June 28, 2012 at 8:10 PM

    Hi,
    This helped me a lot!
    Thanks!

  5. flyscalper
    October 7, 2012 at 2:44 PM

    But where is DisplayGridView()?

  6. pradeep
    October 25, 2012 at 12:45 PM

    Thank this help me lot.

  7. Nishant
    February 18, 2013 at 10:24 AM

    GridViewPageEventArgs giving error.

  8. jmal
    February 21, 2013 at 4:38 PM

    i’m use vs.net2005 there is no NewPageIndex but only ( NewSelectedIndex)

  1. No trackbacks yet.

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

Follow

Get every new post delivered to your Inbox.

Join 65 other followers

%d bloggers like this: