Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82618

Using a html element in column

$
0
0
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

Viewing all articles
Browse latest Browse all 82618

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>