Search code examples
c#asp.netgridviewpage-index-changed

Error in Gridview application


When trying to use the paging part of GridView in my application, I receive the following error:

The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.


Solution

  • I mixed your answers and I get my answer. I solved this problem whit this code :

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        DataBind();
    }