disable inline editing on specific columns with ajax
disable inline editing on specific columns with ajax
dunkinjoes
Posts: 3Questions: 1Answers: 0
I am new with ajax, and I cannot figure out how to disable inline editing on column 0 and 2 on my datatable, can anyone help?
thanks
$(document).ready(function(){
fetch_data();
//fetch record from inventory
function fetch_data()
{
var dataTable = $('#sample_data').DataTable({
"processing" : true,
"serverSide" : true,
"order" : [],
"ajax" : {
url:"AddInventoryFetch.php",
type:"POST"
},
"columnDefs":[
{
"targets":[0, 2],
"orderable":false,
},
]
});
}
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
is there a similar way like
except it applies to Column editable?
This example shows how to enable inline editing on specific columns:
https://editor.datatables.net/examples/inline-editing/simple.html
The code to pay attention to is this:
You can add a class, using
columns.className
to the columns you don't want inline editing enabled on and add that to thenot()
selector.Kevin
Thank you