Tuesday, 24 February 2015

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


first you do

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
                               DataSourceID="SqlDataSource3" DataKeyNames="Id" AllowPaging="True" OnPageIndexChanging="GridView2_PageIndexChanging"
                               
  pageSize="10">



now



just only write


protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e)
             {
 

                 GridView2.PageIndex = e.NewPageIndex;
                                 GridView2.DataBind();
             }



0 comments: