Custom properties in oSettings?
Custom properties in oSettings?
Is it possible to add custom properties to oSettings at init time? For example, can I do something like this?
[code]
$("#data_table").dataTable({
"customProp": "someValue".
"aoColumnDefs": [
{ "fnRender": renderColumn, "aTargets": [1] }
]
});
function renderColumn( oObj ) {
return oObj.oSettings.customProp;
}
[/code]
I know I can add custom properties to oSettings after initialization but I need this property to be available in the fnRender method.
[code]
$("#data_table").dataTable({
"customProp": "someValue".
"aoColumnDefs": [
{ "fnRender": renderColumn, "aTargets": [1] }
]
});
function renderColumn( oObj ) {
return oObj.oSettings.customProp;
}
[/code]
I know I can add custom properties to oSettings after initialization but I need this property to be available in the fnRender method.
This discussion has been closed.
Replies
[code]
$("#data_table").dataTable({
"aoColumnDefs": [
{
"fnRender": function ( o, val ) {
renderColumn( o, val, extraParam );
},
"aTargets": [1]
}
]
});
[/code]
Allan