Сделать все ячейки редактируемыми в DataTables ⇐ Jquery
Сделать все ячейки редактируемыми в DataTables
I am using datatables 1.10.12 and I am having a simple table being drawn with:
projectRevenue = $('#projectRevenue').DataTable({ serverSide: true, processing: true, scrollX: true, stateSave: true, ajax: { url: "{!! route('listOfProjectsRevenueAjax',$project->id) !!}", type: "GET", dataType: "JSON" }, columns: [ { name: 'id', data: 'id' , searchable: false , visible: false }, { name: 'year', data: 'year' , searchable: true , visible: true }, { name: 'product_code', data: 'product_code' , searchable: true , visible: true }, { name: 'jan', data: 'jan' , searchable: true , visible: true }, { name: 'feb', data: 'feb' , searchable: true , visible: true }, { name: 'mar', data: 'mar' , searchable: true , visible: true }, { name: 'apr', data: 'apr' , searchable: true , visible: true }, { name: 'may', data: 'may' , searchable: true , visible: true }, { name: 'jun', data: 'jun' , searchable: true , visible: true }, { name: 'jul', data: 'jul' , searchable: true , visible: true }, { name: 'aug', data: 'aug' , searchable: true , visible: true }, { name: 'sep', data: 'sep' , searchable: true , visible: true }, { name: 'oct', data: 'oct' , searchable: true , visible: true }, { name: 'nov', data: 'nov' , searchable: true , visible: true }, { name: 'dec', data: 'dec' , searchable: true , visible: true }, I would like to be able to edit the cells so that it will get updated in the database. For this I would need to have each with contenteditable set to true and to have a class for example update => for this, I add className: "update", but I don't know how to make it content editable.
Источник: https://stackoverflow.com/questions/553 ... datatables
I am using datatables 1.10.12 and I am having a simple table being drawn with:
projectRevenue = $('#projectRevenue').DataTable({ serverSide: true, processing: true, scrollX: true, stateSave: true, ajax: { url: "{!! route('listOfProjectsRevenueAjax',$project->id) !!}", type: "GET", dataType: "JSON" }, columns: [ { name: 'id', data: 'id' , searchable: false , visible: false }, { name: 'year', data: 'year' , searchable: true , visible: true }, { name: 'product_code', data: 'product_code' , searchable: true , visible: true }, { name: 'jan', data: 'jan' , searchable: true , visible: true }, { name: 'feb', data: 'feb' , searchable: true , visible: true }, { name: 'mar', data: 'mar' , searchable: true , visible: true }, { name: 'apr', data: 'apr' , searchable: true , visible: true }, { name: 'may', data: 'may' , searchable: true , visible: true }, { name: 'jun', data: 'jun' , searchable: true , visible: true }, { name: 'jul', data: 'jul' , searchable: true , visible: true }, { name: 'aug', data: 'aug' , searchable: true , visible: true }, { name: 'sep', data: 'sep' , searchable: true , visible: true }, { name: 'oct', data: 'oct' , searchable: true , visible: true }, { name: 'nov', data: 'nov' , searchable: true , visible: true }, { name: 'dec', data: 'dec' , searchable: true , visible: true }, I would like to be able to edit the cells so that it will get updated in the database. For this I would need to have each with contenteditable set to true and to have a class for example update => for this, I add className: "update", but I don't know how to make it content editable.
Источник: https://stackoverflow.com/questions/553 ... datatables
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Как сделать календарь с редактируемыми событиями (пользователи не могут получить доступ)
Anonymous » » в форуме Html - 0 Ответы
- 126 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как сделать календарь с редактируемыми событиями (пользователи не могут получить доступ)
Anonymous » » в форуме CSS - 0 Ответы
- 110 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Проблема с редактируемыми полями PDF, не отображаемыми в Adobe Acrobat
Anonymous » » в форуме Python - 0 Ответы
- 7 Просмотры
-
Последнее сообщение Anonymous
-