Using mDataProp with Datatables Editable Plugin

Using mDataProp with Datatables Editable Plugin

CMCDragonkaiCMCDragonkai Posts: 3Questions: 0Answers: 0
edited February 2012 in General
[code]
$(document).ready(function(){

var oTable = $('#ogx_app_table').dataTable({
"bProcessing" : true,
"bServerSide" : true,
"sPaginationType": "full_numbers",
"aaSorting": [[1,'asc'], [0, 'desc']],
"iDisplayLength": 15,
"aLengthMenu": [[15, 50, 100, -1], [15, 50, 100 ,"All"]],
"sAjaxSource": "<?php bloginfo('template_directory'); ?>/ogx_app_datatables.php",
"aoColumns": [
{ "mDataProp": "id" },
{ "mDataProp": "status" },
{ "mDataProp": "name" },
{ "mDataProp": "internship" },
{ "mDataProp": "date_of_entry" },
{ "mDataProp": "date_of_departure" },
{ "mDataProp": "date_of_return" },
],
}).makeEditable({

sUpdateURL: "<?php bloginfo('template_directory'); ?>/ogx_app_datatables_edit.php",
"aoColumns": [
null,
{
tooltip: 'Click to update status!',
loadtext: 'loading...',
type: 'select',
onblur: 'submit',
data: "{'open':'Open','B':'B','C':'C'}",
},
null,
null,
null,
null,
null,
],

});
[/code]

Currently I'm using the above code. The datatables works without the makeEditable, but with it, the table just hangs, it loads the data but it cannot make it editable. I suspect it has something to do with mDataprop, I'm using an array of objects. Can someone help?

Replies

This discussion has been closed.