title: 'GridView1' fired event PageIndexChanging which wasn't handled
body: <p>I am using a gridview and I want to use paging.  I have already set allow paging to true and page size to 5.  I can see the numbers at the base of my gridview, but when i click on a number to move to respective page, it throws an error saying:</p>
  
  <p><code>The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.</code></p>
  
  <p>Code:</p>
  
  <pre><code> &lt;asp:GridView ID="GridView1" runat="server" CellPadding="5" 
      AutoGenerateColumns="False" AllowPaging="True" DataKeyNames="contact_id" 
      onrowcancelingedit="GridView1_RowCancelingEdit" 
      onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
      PageSize="5"&gt;
      &lt;Columns&gt;
          &lt;asp:TemplateField HeaderText="contact_id"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label3" runat="server" Text='&lt;%# Eval("contact_id") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="name"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label4" runat="server" Text='&lt;%# Eval("name") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="address"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label5" runat="server" Text='&lt;%# Eval("address") %&gt;'&gt;&lt;/asp:Label&gt;&lt;br /&gt;
                  &lt;asp:Label ID="Label6" runat="server" Text='&lt;%# Eval("city") %&gt;'&gt;&lt;/asp:Label&gt;&lt;br /&gt;
                   &lt;asp:Label ID="Label7" runat="server" Text='&lt;%# Eval("state") %&gt;'&gt;&lt;/asp:Label&gt;&lt;br /&gt;
             &lt;asp:Label ID="Label8" runat="server" Text='&lt;%# Eval("pincode") %&gt;'&gt;&lt;/asp:Label&gt;
  
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="email"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label9" runat="server" Text='&lt;%# Eval("email") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="mobile"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label10" runat="server" Text='&lt;%# Eval("mobile") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="context"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label11" runat="server" Text='&lt;%# Eval("context") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="status"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="Label12" runat="server" Text='&lt;%# Eval("status") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
              &lt;EditItemTemplate&gt;
                  &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
                  &lt;asp:ListItem&gt;PENDING&lt;/asp:ListItem&gt;
                  &lt;asp:ListItem&gt;OK&lt;/asp:ListItem&gt;
                  &lt;/asp:DropDownList&gt;
              &lt;/EditItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="Edit" ShowHeader="False"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                      CommandName="Edit" Text="Edit"&gt;&lt;/asp:LinkButton&gt;
              &lt;/ItemTemplate&gt;
              &lt;EditItemTemplate&gt;
                  &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                      CommandName="Update" Text="Update"&gt;&lt;/asp:LinkButton&gt;
                  &amp;nbsp;&lt;asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                      CommandName="Cancel" Text="Cancel"&gt;&lt;/asp:LinkButton&gt;
              &lt;/EditItemTemplate&gt;
              &lt;ItemStyle CssClass="button" /&gt;
          &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;
      &lt;PagerStyle HorizontalAlign="Left" VerticalAlign="Middle" /&gt;
  &lt;/asp:GridView&gt;
  </code></pre>