the reference guides to use "mRender" : function ( data, type, full ) { ... return } " where the function return value is used to render html.
what I am not clear is with the values of - data, type, full. The doc says -
The function takes three parameters:
{array|object} The data source for the row (based on mData)
{string} The type call data requested - this will be 'filter', 'display', 'type' or 'sort'.
{array|object} The full data source for the row (not based on mData)
Which is not completely clear to me.
My datatable initialization code is below -
oTable = $('#dataDisplay').dataTable( {
"aaData": dataArray,
"aoColumns": [
{ "mData" : "cityName" },
{ "mData": "personName" },
{ "mRender": function (dataArray, display, dataArray ) {
return '<span align="center" > <input type="checkbox" name="select" align="center" class="checkBox" </span>'; } } ],
"bLengthChange" : "false",
"iDisplayLength": 30,
"bDestroy": true,
"bJQueryUI": true,
} );
}
The values I am passing in to function seem to be incorrect and are giving me errors -
"DataTables warning (table id = 'table_IOS_snmp_server_chassis_id'): Requested unknown parameter '3' from the data source for row 0"
what are the value i need to pass in to the function. ?
Any immediate suggestion is highly appreciated.
Enjoy coding.
Thanks,
Vamshe
what I am not clear is with the values of - data, type, full. The doc says -
The function takes three parameters:
{array|object} The data source for the row (based on mData)
{string} The type call data requested - this will be 'filter', 'display', 'type' or 'sort'.
{array|object} The full data source for the row (not based on mData)
Which is not completely clear to me.
My datatable initialization code is below -
oTable = $('#dataDisplay').dataTable( {
"aaData": dataArray,
"aoColumns": [
{ "mData" : "cityName" },
{ "mData": "personName" },
{ "mRender": function (dataArray, display, dataArray ) {
return '<span align="center" > <input type="checkbox" name="select" align="center" class="checkBox" </span>'; } } ],
"bLengthChange" : "false",
"iDisplayLength": 30,
"bDestroy": true,
"bJQueryUI": true,
} );
}
The values I am passing in to function seem to be incorrect and are giving me errors -
"DataTables warning (table id = 'table_IOS_snmp_server_chassis_id'): Requested unknown parameter '3' from the data source for row 0"
what are the value i need to pass in to the function. ?
Any immediate suggestion is highly appreciated.
Enjoy coding.
Thanks,
Vamshe