title: Select row on gridview using jQuery
body: <p>I have the following jQuery function below:</p>
  
  <pre><code>$("[id*=gridView1] td").on("click", function () {
      var row = $(this).parent();
      $("[id*=gridView1] tr").each(function () {
          if ($(this)[0] != row[0]) {
              $("td", this).removeClass("gridView1_selectedRow");
          }
      });
  
      var done = 0;
      $("td", row).each(function () {
      if (!$(this).hasClass("gridView1_selectedRow")) {
          $(this).addClass("gridView1_selectedRow");
      }
      else {
          $(this).removeClass("gridView1_selectedRow");
          }
      });
  });
  </code></pre>
  
  <p>What it does is it will add a css class on the selected row, adding highlight.</p>
  
  <p>My problem is I don't want my user to highlight or select the last row of my gridview because it will be a row of page number, not data row.</p>
  
  <p>I tried using this:</p>
  
  <pre><code> $("[id*=gridView1] tr:not(:last-child)")
  </code></pre>
  
  <p>But I ended up highlighting the whole gridview or all rows.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks!</p>