accessing value of an adjacent cell

accessing value of an adjacent cell

th3l0rdth3l0rd Posts: 1Questions: 0Answers: 0
edited July 2010 in General
In datatables what is the easiest method to access the value of an adjacent cell (row) when initialized using a JavaScript array - It is possible to access the data that’s in the cell itself, but I am not able to find any documentation around accessing the data in the adjacent cell / or any other cell.
[code]
$(document).ready(function() {
$('#demo').html( '' );
$('#example').dataTable( {
"aaData": [
/* Reduced data set */
[ "Trident", "Internet Explorer 4.0", "Win 95+", 4, "X" ]

],
"aoColumns": [
{ "sTitle": "Engine" },
{ "sTitle": "Browser" },
{ "sTitle": "Platform" },
{ "sTitle": "Version", "sClass": "center" },
{
"sTitle": "Grade",
"sClass": "center",
"fnRender": function(obj) {
var sReturn = obj.aData[ obj.iDataColumn ];
if ( sReturn == "A" ) {
sReturn = "A";
}
return sReturn;
}
}
]
} );
} );
[/code]
In the above code – is there a method to access the values in the “Version” cell from the “Grade” cell –
Thanks in advance
This discussion has been closed.