fnCreatedCell function does not do anything

fnCreatedCell function does not do anything

k_rell23k_rell23 Posts: 3Questions: 0Answers: 0
edited March 2012 in DataTables 1.9
Hello. I am having problems with the fnCreatedCell function. It does not do anything. I have tested this by ading an alert() into this initialisation:

[code]
mTable = $("#mTable").dataTable({
bJQueryUI: true,
bProcessing: true,
bServerSide: true,
sPaginationType: "full_numbers",
sAjaxSource: "serverGet.php",
fnServerParams: function (aoData) {
aoData.push(
{name: "dbc_db", value: "......"},
{name: "dbc_col", value: "......"},
{name: "dbc_key", value: "......"}
);
},
aoColumnDefs: [{
aTargets: ["_all"],
fnRender: function (o, val) {
return processOutput(o.aData[o.iDataColumn]);
},
fnCreatedCell: function(nTd, sData, oData, iRow, iCol) {
alert();
}
},{
aTargets: [0],
bSortable: false
}],
aaSorting: [[1, "asc"]]
});
[/code]

As soon as the page finished loading, there is no alert message appearing.

I have tried to remove fnRender, thinking that the both cannot work simultaneously, but that does not help.
I am curios whether this is a bug in 1.9 or if I am doing something wrong.

Thanks !

Replies

  • k_rell23k_rell23 Posts: 3Questions: 0Answers: 0
    I believe you can remove this post as I have solved the problem.
    It seems that I was using the older 1.8 version of DataTables.

    Sorry for wasting your time.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It seems to work okay here: http://live.datatables.net/ozokid/2/edit . I don't see anything in your code that would cause a problem. Have you tried the 1.9.1.dev nightly from the downloads page?

    Allan
This discussion has been closed.