hi..
how to use the fn.dataTable.Editor functionality on visual force page. Please find below sample code (highlighted code is not working)
function prepareEditTable_{!tableID}(initializeFunction,drawCallbackFunction)
{
// Prepare data in case of JSON based response
if(columnData_{!tableID} && datatableRowData_{!tableID} )
{
getColumnData_{!tableID}(columnData_{!tableID},columnHeader_{!tableID});
getBody_{!tableID}(datatableRowData_{!tableID});
}
var finalDomValue='<<"left"{!enableLength}><"right"{!enablePagination}>><"width100 viewWidth"t><<"left"i><"right"{!enablePagination}>>';
if('{!customDom}')
{
finalDomValue="{!customDom}";
}
**
dynamicTable_{!tableID} = new {!jqueryVariable}.fn.dataTable.Editor( {
"table": {!tableID},
"fields": [columnArray_{!tableID}]
} ); **
//editor.inline( $('#{!tableID} tbody tr:first-child td:first-child') );
dynamicTable_{!tableID} = {!jqueryVariable}('#{!tableID}').DataTable(
{
"dom": "Bfrtip",
"data": dataArray_{!tableID},
"columns": columnArray_{!tableID},
"columnDefs": [
{"targets": [0], "searchable": {!col1_searchable}, "orderable": {!col1_orderable}, "visible": true},
{"targets": [1], "searchable": {!col2_searchable}, "orderable": {!col2_orderable}, "visible": true }
],
"order": [ [{!orderColumn}, '{!orderDirection}'] ],
"ordering":{!orderingBool},
"paging":{!pagingbarBool},
"pagingType": "{!pagingationType}",
"bSearchable": true,
"lengthMenu": {!pagingArray},
"dom": finalDomValue,
"info": {!info},
"initComplete": initializeFunction,
"drawCallback": drawCallbackFunction,
"retrieve": true,
"keys": {
"columns": ":not(:first-child)",
"keys": [ 9 ],
"editor": "editor",
"editOnFocus": true
},
"select": {
"style": 'os',
"selector": 'td:first-child'
},
"fnInitComplete": function(){ }
});
hideLoading_{!tableID}();
}