Display sSpecific

Display sSpecific

amun1000amun1000 Posts: 7Questions: 1Answers: 0
edited December 2013 in DataTables 1.9
Hi Just wondering why I'm getting the error dialog when it calls
[code]return oCol.fnRender( {
"iDataRow": iRow,
"iDataColumn": iCol,
"oSettings": oSettings,
"aData": oSettings.aoData[iRow]._aData,
"mDataProp": oCol.mData
}, _fnGetCellData(oSettings, iRow, iCol, 'display') [/code]

Table is initialised with the following
[code]
var oTable = $('#example').dataTable({
"bServerSide": false,
"sAjaxSource": "/Vehicle/GetParts",
"sAjaxDataProp": "",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "id", "value": "@Model.Id" } );},
"bProcessing": true,
"aoColumns": [
{
"sName": "Part",
"bSearchable": true,
"bSortable": true,
"fnRender": function (oObj) {
return oObj.aData.DisplayName;
}
},
{
"sName": "Price",
"bSearchable": true,
"bSortable": false,
"fnRender": function (oObj) {
return '';
}
},
{
"sName": "Notes",
"bSearchable": true,
"bSortable": false,
"fnRender": function (oObj) {
return '';
}
},
{
"sName": "Action",
"bSearchable": true,
"bSortable": false,
"fnRender": function (oObj) {
return buildActionButtons(oObj);
}
}
],
"fnCreatedRow": function (nRow, aData, iDataIndex) {
$(nRow).attr('data-for-part', aData.Id);

$('td:eq(0)', nRow).css('width', '320px');
//Pending
if (aData.Status == 0) {
$(nRow).addClass('status-forsale');
}
else if (aData.Status == 1) {
$( nRow).addClass('status-pending');
}
if (aData.Status == 2) {
$(nRow).addClass('status-sold');
}
}
});[/code]

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    From the docs:
    [quote]fnRender:
    Please note that this option has now been deprecated and will be removed in the next version of DataTables. Please use mRender / mData rather than fnRender.[/quote]
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    What is the error you are getting? Also can you please link us to a test case or the page showing the issue.

    Allan
This discussion has been closed.