datatable inline edit with jstl tag

datatable inline edit with jstl tag

yichenmaoyichenmao Posts: 2Questions: 2Answers: 0
edited July 2017 in Free community support

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

Answers

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    What is a "jstl tag"?

    However, I cannot find my editField, since I not loading data from json

    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

This discussion has been closed.