URGENT :Trying to assign the Id to a Button placed in one of the column of the dataTable

URGENT :Trying to assign the Id to a Button placed in one of the column of the dataTable

kjhambkjhamb Posts: 1Questions: 0Answers: 0
edited July 2012 in General
hi ,
Actually I am trying to place a button in one of the column of the datatable , specifically the 3rd column here in my code but with the ID equal to the data value of that column , but I am not able to acces the data ofany row using fnrowcallback method , its says undefined , I am not able to figure out the problem

my code
[code]

$(document).ready(function () {

var oTable = $('#approvalsPending').dataTable({

"bSortClasses": false,
"bProcessing":true,

"sAjaxSource":domain+"rest/dataTable?format=json",

"sAjaxDataProp":"AAData.aaData",
"aaSorting": [[3,'desc']],

"aoColumns":[


{ "mDataProp":"requestOwner" },
{ "mDataProp":"lastAction" },
{ "mDataProp":"status" },
{ "mDataProp":"approvalId" }

] ,

"fnRowCallback": function( nRow, aData, iDisplayIndex ) {

var aId = aData[3];
alert(aData[2]);


$('td:eq(3)', nRow).html('');

return nRow ;
}



});


});

[/code]

Replies

  • prsdprsd Posts: 14Questions: 0Answers: 0
    I am thinking of: "sAjaxDataProp":"AAData.aaData" could be causing an issue. See what is returned as a JSON.
This discussion has been closed.