title: C# : RowUpdating Method not called when Update is clicked in a gridView
body: <p>I am having a gridView which has a Edit, Delete, Update and Cancel  link buttons to perform the respected functionalities.</p>
  
  <p>Edit, Delete and Cancel commands work fine.</p>
  
  <p>But the problem is that the <code>RowUpdating</code> Event is not fired when I click Update Link Button on the gridView.</p>
  
  <p>What could be wrong?</p>
  
  <p>Here is my code: </p>
  
  <pre><code>&lt;asp:GridView ID="gvCompanies" runat="server" AutoGenerateColumns="False" AllowPaging="True" 
              onpageindexchanging="gvCompanies_PageIndexChanging" 
              onrowediting="gvCompanies_RowEditing" PageSize="20" 
              onrowcancelingedit="gvCompanies_RowCancelingEdit" 
              onrowdeleting="gvCompanies_RowDeleting" 
              onrowupdating="gvCompanies_RowUpdating" &gt;
              &lt;Columns&gt;
                  &lt;asp:BoundField DataField="id" HeaderText="ID" ReadOnly="True" /&gt;
                  &lt;asp:BoundField DataField="name" ItemStyle-Width="200px" 
                      ItemStyle-HorizontalAlign="Left" HeaderText="Name" &gt;
                 &lt;ItemStyle HorizontalAlign="Left" Width="200px"&gt;&lt;/ItemStyle&gt;
                  &lt;/asp:BoundField&gt;
                  &lt;asp:BoundField DataField="address" HeaderText="Address"&gt;
                      &lt;ItemStyle HorizontalAlign="Left" Width="200px" /&gt;
                  &lt;/asp:BoundField&gt;
                  &lt;asp:BoundField DataField="city" ItemStyle-Width="200px" 
                      ItemStyle-HorizontalAlign="Left" HeaderText="City" &gt;
                   &lt;ItemStyle HorizontalAlign="Left" Width="200px"&gt;&lt;/ItemStyle&gt;
                  &lt;/asp:BoundField&gt;
                  &lt;asp:BoundField DataField="state" ItemStyle-Width="200px" 
                      ItemStyle-HorizontalAlign="Left" HeaderText="State" &gt;
                      &lt;ItemStyle HorizontalAlign="Left" Width="200px" /&gt;
                  &lt;/asp:BoundField&gt;
                  &lt;asp:BoundField DataField="zipcode" HeaderText="Zip Code" /&gt;
                  &lt;asp:BoundField DataField="telephone" HeaderText="Telephone" /&gt;
                  &lt;asp:BoundField DataField="fax" HeaderText="Fax" /&gt;
                  &lt;asp:BoundField DataField="mobile" HeaderText="Mobile" /&gt;
                  &lt;asp:BoundField DataField="website" HeaderText="Website" /&gt;
                  &lt;asp:BoundField DataField="email" HeaderText="Email" /&gt;
                  &lt;asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /&gt;
              &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>In .cs file My RowUpdating Event is as below</p>
  
  <pre><code>    protected void gvCompanies_RowUpdating(object sender, GridViewUpdateEventArgs e)
      {
          //My Code for Update
      }
  </code></pre>
  
  <p><strong>NOTE:</strong> I had checked out all the similar questions on Stackoverflow but none seem to work for me. So I had posted this question</p>