The tables2 row
object is not the record.. but the record is within it. So you can do:
<tr id="row_{{ row.record.id }}" class="{{ forloop.counter|divisibleby:2|yesno:"even,odd" }}">
Or using a data property
<tr data-record-id="row_{{ row.record.id }}" class="{{ forloop.counter|divisibleby:2|yesno:"even,odd" }}">
This definitely works.. I am using it.
Also look at the (last) answer here: django-tables2 specify different properties for different rows which suggests using a custom render method to add some html to a cell within each row. That way you don't have to maintain a custom tables2 template. Then with help from jquery it's easy enough to find the element containing the id.. if the user clicks on the row, or whatever it is that you'd like to do...