editing row with jqeditable
editing row with jqeditable
i'm a newbie..i try to make my datatable become editable..
i interested to use jqeditable..but i still not understand at this part:
[code]
$('#example tbody td').editable( '../examples_support/editable_ajax.php', {
[/code]
can you tell me?
how to use jqeditable at my datatable..bcoz i'm a newbie.
[code]
$("#show").click(function(event){
if (typeof oTable=='undefined'){
oTable = $("#datalist").dataTable({
"bRetrieve" : true,
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": 'showlist.php',
"fnServerData": function (sSource,aoData,fnCallback){
aoData.push({"name":"line","value":$("#showline").val()});
aoData.push({"name":"model","value":$("#showmodel").val()});
aoData.push({"name":"serial","value":$("#serial").val()});
aoData.push({"name":"NIK","value":$("#showNIK").val()});
$.ajax({
"dataType":'json',
"type":'POST',
"url":sSource,
"data":aoData,
"success":function(json){
fnCallback(json);
}
});
},
"aaSorting" : [[1,"desc"]],
"aoColumns" : [
/*Line*/ null,
/*Model*/ null,
/*Serial*/null,
/*NIK*/ null
]
});
}else{
oTable.fnDraw();
}
});
$("#datalist tbody").click(function(event) {
$(oTable.fnSettings().aoData).each(function(){
$(this.nTr).removeClass("row_selected");
});
$(event.target.parentNode).addClass("row_selected");
});
[/code]
i interested to use jqeditable..but i still not understand at this part:
[code]
$('#example tbody td').editable( '../examples_support/editable_ajax.php', {
[/code]
can you tell me?
how to use jqeditable at my datatable..bcoz i'm a newbie.
[code]
$("#show").click(function(event){
if (typeof oTable=='undefined'){
oTable = $("#datalist").dataTable({
"bRetrieve" : true,
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": 'showlist.php',
"fnServerData": function (sSource,aoData,fnCallback){
aoData.push({"name":"line","value":$("#showline").val()});
aoData.push({"name":"model","value":$("#showmodel").val()});
aoData.push({"name":"serial","value":$("#serial").val()});
aoData.push({"name":"NIK","value":$("#showNIK").val()});
$.ajax({
"dataType":'json',
"type":'POST',
"url":sSource,
"data":aoData,
"success":function(json){
fnCallback(json);
}
});
},
"aaSorting" : [[1,"desc"]],
"aoColumns" : [
/*Line*/ null,
/*Model*/ null,
/*Serial*/null,
/*NIK*/ null
]
});
}else{
oTable.fnDraw();
}
});
$("#datalist tbody").click(function(event) {
$(oTable.fnSettings().aoData).each(function(){
$(this.nTr).removeClass("row_selected");
});
$(event.target.parentNode).addClass("row_selected");
});
[/code]
This discussion has been closed.