I took the Jeditable (or jEditable) example on datatables.net and modified it based on what Golden Bird provided in the question and what the Jeditable docs say about this. To check, you can edit any value in the grid, sorting is applied at the same time, and everything else is connected with working with data (for example, to search for a new value).
$(document).ready(function() { var oTable = $('table').dataTable(); var theCallback = function(v, s) { // Do something with the new value return v; }; $(oTable).find('td').editable(theCallback, { "callback": function(sValue, y) { var aPos = oTable.fnGetPosition(this); oTable.fnUpdate(sValue, aPos[0], aPos[1]); }, "data": "{'0':'0%', '.1':'10%', '.15': '15%', '.2': '20%', 'selected':'0'}", "type" : "select", "submit" : "OK", "style": {"height": "100%","width": "100%"} }); });
source share