How to update data on the current page?

How to update data on the current page?

alimuradofalimuradof Posts: 2Questions: 2Answers: 0

var editor;
$(document).ready(function() {

//Инициализируем Editor
var editor = new $.fn.dataTable.Editor( {
    idSrc:  'Код',
    table: "#table_id",
    fields: [ {
            label: "Код:",
            name: "Код"
        },
            {
            label: "Номенклатура:",
            name: "Номенклатура"
        }, {
            label: "Цена:",
            name: "Цена"
        }, {
            label: "Срок годности:",
            name: "Срок годности"
        }, {
            label: "Остаток:",
            name: "Остаток"
        }, {
            label: "Заказ:",
            name: "Заказ"
        }, {
            label: "Производитель:",
            name: "Производитель",
        }
    ]
} );

    // Activate an inline edit on click of a table cell
$('#table_id').on( 'click', 'tbody td.editable', function (e) {
    editor.inline( this );
} );

//Инициализируем таблицу
var table = $('#table_id').DataTable({
    //"lengthMenu": [[50, 150, -1], [50, 150, "Показать все"]],
    "paging": false,
    "columns": [
        { data: "Код" },
        { data: "Номенклатура" },
        { data: "Цена" },
        { data: "Срок годности" },
        { data: "Остаток" },
        { data: "Заказ", className: "editable" },
        { data: "Производитель" }
    ],
      // Подключаем кнопки
    "buttons": [
        {
            extend: 'collection',
            text: 'Export',
            buttons: [
                'copy', 
                'excel',
                'csv',
                'pdf',
                'print'
            ]
        }
    ]

});

After changing data in a table error:
Uncaught TypeError: Cannot read property 'replace' of undefined

This discussion has been closed.