Defining the with fnAddData [SOLVED!!!]
Defining the with fnAddData [SOLVED!!!]
Hi
How can I set the class for a when using fnAddData??
When I dynamically built my table, in many of the columns of a row I just put it in the like this:
When using fnAddData, I pass an array with the values that go on each column (the check box from the example or something different), but how can I establish the class for each column of the row (the )? Is there a work around for that?
Thanks in advance.
-----------------------------------------
SOLUTION:
I followed what Allan wrote in another post (http://www.datatables.net/forums/discussion/181/fnadddata-and-add-class/p1) and was able to sort my problem.
Here is the code to set the class for cell 0:
[code]
var a = oTable.fnAddData(rowArray);
var nTr = oTable.fnSettings().aoData[ a[0] ].nTr;
nTr.cells.item(0).className = "yourClass"; // nTr.cells.item holds all the cells.
[/code]
Hope this can help someone else.
How can I set the class for a when using fnAddData??
When I dynamically built my table, in many of the columns of a row I just put it in the like this:
When using fnAddData, I pass an array with the values that go on each column (the check box from the example or something different), but how can I establish the class for each column of the row (the )? Is there a work around for that?
Thanks in advance.
-----------------------------------------
SOLUTION:
I followed what Allan wrote in another post (http://www.datatables.net/forums/discussion/181/fnadddata-and-add-class/p1) and was able to sort my problem.
Here is the code to set the class for cell 0:
[code]
var a = oTable.fnAddData(rowArray);
var nTr = oTable.fnSettings().aoData[ a[0] ].nTr;
nTr.cells.item(0).className = "yourClass"; // nTr.cells.item holds all the cells.
[/code]
Hope this can help someone else.
This discussion has been closed.