datatable inline edit with jstl tag
datatable inline edit with jstl tag
yichenmao
Posts: 2Questions: 2Answers: 0
Hi all, I am a newbie for javascript and web development. I am try to load the data by jstl tag and them enable the inline editing for this work. But alway get the error"Unable to automatically determine field from source. Please specify the field name". I have read the tech notes https://datatables.net/manual/tech-notes/11, However, I cannot find my editField, since I not loading data from json. Can anyone help me to look at my code?
var editor; $(document).ready( function() { editor = new $.fn.dataTable.Editor({ table : "#linktable" }); $('#linktable').on('click', 'tbody td:not(:first-child)', function(e) { editor.inline(this); }); $('#linktable').DataTable({ "scrollY" : "600px", "scrollCollapse" : true, "paging" : false, "info" : false, "bAutoWidth" : false }).draw(); });LinkId | DetectorCount |
---|---|
This discussion has been closed.
Answers
What is a "jstl tag"?
I would suggest having a look over this example. It shows how you can read from an HTML table to an object (the default is an array) which makes it easier to access the data.
Allan