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
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]
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]
This discussion has been closed.
Replies