aoColumns doesn't show a toggle image column

aoColumns doesn't show a toggle image column

nobutsnobuts Posts: 1Questions: 0Answers: 0
edited February 2013 in Plug-ins
I'm using DataTables as a data grid manager on my app. Everything works fine but until I'm equipped a hidden row info plugin. I tried many ways to change things but the first column of toggle image never showed up. Here's my code:

**Javascript**
[code]
var oTable;
/* Formating function for row details */
function fnFormatDetails(nTr){
var aData=oTable.fnGetData(nTr);
var sOut='';
sOut+='Renderingengine:'+aData[2]+''+aData[3]+'';
sOut+='Linktosource:Couldprovidealinkhere';
sOut+='Extrainfo:Andanyfurtherdetailshere(imagesetc)';
sOut+='';
return sOut;
}

$(document).ready(function() {
oTable=$('#labour_show').dataTable({
"fnDrawCallback": function(){//row highlighter
$('table#labour_show td').bind('mouseenter', function () { $(this).parent().children().each(function(){$(this).addClass('datatablerowhighlight');}); });
$('table#labour_show td').bind('mouseleave', function () { $(this).parent().children().each(function(){$(this).removeClass('datatablerowhighlight');}); });
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "inc/_labour_show_ajax.php",
"aoColumns":[null,null,null,{"fnRender": function(oObj){return "Edit";} }],"aaSorting": [[1, 'asc']]
});

$('#labour_show tbody td img').live('click',function(){
var nTr = this.parentNode.parentNode;
if(this.src.match('details_close')){
/* This row is already open - close it */
this.src = "images/ico_expand.png";
oTable.fnClose( nTr );
}else{
/* Open this row */
this.src = "images/ico_collapse.png";
oTable.fnOpen( nTr, fnFormatDetails(nTr), 'details' );
}
});
});
[/code]
**_labour_show_ajax.php**

This is an arrays from a server-side script

[code] $aColumns = array('labr_uid', 'labr_fname', 'emplyr_comp','labr_sid');[/code]

HTML Code:
[code]




Passport
Name
Employer
Edit







[/code]

No matter I've tried. The first column never shown up. Please suggest.
This discussion has been closed.