title: Add ID attribute to last row only in jQuery DataTable
body: <p>I'm trying to get the last row in <code>DataTable</code> as I need to add a style to this row only <em>not</em> the last row of every page, so no CSS. I have the following code which identifies the last row in the <code>DataTable</code></p>
  
  <pre><code>"initComplete": function () {
       var last_row = existingRuleTable.row(':last').data();
       console.log(last_row);
  }
  </code></pre>
  
  <p>This returns the following:</p>
  
  <p><a href="https://i.stack.imgur.com/P2d18.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P2d18.png" alt="enter image description here"></a></p>
  
  <p>Which when looking at the <code>DataTable</code> is correct:</p>
  
  <p><a href="https://i.stack.imgur.com/gRGVr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gRGVr.png" alt="enter image description here"></a></p>
  
  <p>But I can't add CSS to <em>this</em> row only.</p>
  
  <p>I have tried some of the below</p>
  
  <pre><code>last_row.attr('id', 'ABC');
  last_row.row('tr:last').attr('id', 'ABC');
  last_row.css('color', 'red');
  </code></pre>
  
  <p>But always get an error similar to</p>
  
  <blockquote>
    <p>last_row.row is not a function</p>
  </blockquote>