While unique id's for each table cell are useful, it's also really handy to be able to use a class to refer to entire column and/or row.
In tablefield_process(), set the tablefield cell #attribute as

'#attributes' => array('id' => 'tablefield-' . str_replace('_', '-', $element['#field_name']) .'-'. $delta . '-cell-' . $i . '-' . $ii, 'class' => 'tablefield-row-'. $i .' tablefield-column-'. $ii),

Comments

weseze’s picture

Take a look at my patch over here: http://drupal.org/node/1094568
It provides much more then you want, but classes for rows and cols are also included ;)

ahimsauzi’s picture

Not last and first classes :(

lolandese’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)
Related issues: +#1608832: custom class or line-number to "tr"-tag

Closing as "Won't fix" because the Drupal 6 version is unsupported and the issue doesn't seem to appear on Drupal 7 or 8. If you believe it does, feel free to reopen the issue and change the version as appropriate.

Of course you can also reopen the issue if you provide a patch that fixes the issue.