title: How to delete a gridview row using Javascript or jQuery
body: <p>How do I use this jQuery function to remove a row.</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function() {
      $("tr").filter(function() {
          return $('td', this).length &amp;&amp; !$('table', this).length
      }).click(function() {
          $(this).remove();
      });
  
      //enter code here 
  });       
  </code></pre>
  
  <p>It will delete a row when I mouse hover and click on a row, but in my gridview render as a table and it contains a <code>tr</code> that has a one hidden control and it has a <code>id</code>.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tr style="color: #244D8D; background-color: #FFFBD6;" ondblclick="selectRow_gvResults_gov(0,6532,0)"&gt;
      &lt;td&gt;
          &lt;input type="hidden" value="6532" id="MainContent_gvResults_gov_hdDocID_0" name="ctl00$MainContent$gvResults_gov$ctl02$hdTocID"&gt;
      &lt;/td&gt;
      &lt;td&gt;
          1010041215
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Here I have another control delete button, in delete button I will get a id to delete, here I want to  pass that id as a parameter to script function ,
  and I want to search hidden field contains those value and delete that row.</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnDelete.Click
      'some operations
      ScriptManager.RegisterStartupScript(Me, GetType(String), "Deletearow", "DeleteGrid_Row(" &amp; Me.hfSelected_GvResultsRowTocID.Value &amp; ");", True)
  
  End Sub
  </code></pre>