robertino_salemi
24-04-2014, 11:26
Salve a tutti,
sto utilizzando il Plugin DataTables.net (http://www.datatables.net/)
Vorrei applicare uno stile ad ogni singola cella, così per iterarla ho scritto:
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
for (var i = 0; i < nRow.offsetTop; i++) { <-- offsetTop error?!?
switch (aData[i]) {
case "Y":
var new_class = "UnitChargeStatusYes";
var new_text = "Y";
break;
case "N":
var new_text = "";
break;
case "M":
var new_class = "UnitChargeStatusMaybe";
var new_text = "M";
break;
}
$('td:eq(i)', nRow).addClass(new_class); <-- Error!?!
}
},
Purtroppo però non funziona.
:(
sto utilizzando il Plugin DataTables.net (http://www.datatables.net/)
Vorrei applicare uno stile ad ogni singola cella, così per iterarla ho scritto:
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
for (var i = 0; i < nRow.offsetTop; i++) { <-- offsetTop error?!?
switch (aData[i]) {
case "Y":
var new_class = "UnitChargeStatusYes";
var new_text = "Y";
break;
case "N":
var new_text = "";
break;
case "M":
var new_class = "UnitChargeStatusMaybe";
var new_text = "M";
break;
}
$('td:eq(i)', nRow).addClass(new_class); <-- Error!?!
}
},
Purtroppo però non funziona.
:(