need to add unique class to each row after adding

need to add unique class to each row after adding

sam@ggidealab.comsam@ggidealab.com Posts: 1Questions: 0Answers: 0
edited April 2011 in General
I need to add a UNIQUE class to EVERY row. The following code works until there are more entries than can fit on a page. Then adding a new row does not introduce a new dom element so I cannot find it to add the correct class. This strategy is not very elegant anyway... any advice?

[code]
var dataTableArgs = {
//the csTrInit class is used to signify that it is a new row
asStripClasses : ['csTrInit]
};
...

var dataTableData = [this.profilePicT, this.ownerTextT, this.titleTextT, this.statusIconT];
this.container.dataTable.fnAddData(dataTableData);
this.$tr = this.container.$dom.find('tr.csTrInit');
if(this.$tr.length !== 1){
throw error('no inbox row or multiple inbox init rows found!!!');
}
//this was added to every inbox row as per InboxTab.dataTableArgs and is only
//used to signify that it is a new row
this.$tr.removeClass('csTrInit');
this.$tr.addClass('csInboxExpTr' + this.exp);
[/code]
This discussion has been closed.