fnRender applied multiple times
fnRender applied multiple times
Hi,
I wanto to display the same data source column (col1 in the example below) twice in the datatable:
the first time without rendering, while the second times applying a rendering function (renderCol1).
[code]
$(document).ready( function() {
var dataTableSettingsLocal = {
"bLengthChange": true,
"bServerSide": true,
"sAjaxSource": "list.json",
"bProcessing": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mDataProp": "col1"},
{ "mDataProp": "col2" },
{ "mDataProp": "col1", "fnRender": renderCol1 }
]
...
});
[/code]
The problem is that I get the function renderCol1 applied to the first colum although I don't call it.
How can I avoid this side-effect?
Thanks
I wanto to display the same data source column (col1 in the example below) twice in the datatable:
the first time without rendering, while the second times applying a rendering function (renderCol1).
[code]
$(document).ready( function() {
var dataTableSettingsLocal = {
"bLengthChange": true,
"bServerSide": true,
"sAjaxSource": "list.json",
"bProcessing": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mDataProp": "col1"},
{ "mDataProp": "col2" },
{ "mDataProp": "col1", "fnRender": renderCol1 }
]
...
});
[/code]
The problem is that I get the function renderCol1 applied to the first colum although I don't call it.
How can I avoid this side-effect?
Thanks
This discussion has been closed.
Replies
Allan
[code]
…
{ "mDataProp": null, "fnRender": renderCol1 }
…
[/code]