rowReorder problem

rowReorder problem

diego.martinezdiego.martinez Posts: 4Questions: 2Answers: 0

Hi

Somebody can help me. I tried to use rowReorder plug-in, but when drag & drop a row appear this message

Uncaught TypeError: Cannot read property 'multiSet' of undefined

I'm using the same example of the page, but, using my data does not work.

Here is the code:

editorAD = new $.fn.dataTable.Editor( {
ajax: "../../sigpe/agenda/detalle/inline",
table: "#detalleTable",
"idSrc": "adId",
fields: [
{
label: "field_1",
name: "field_1",
},
{
label: "field_2",
name: "field_2",
},
...
]
]);

oTableAD = $('#table').DataTable({
rowReorder: true
"ajax": {
"url": "getData",
},
"columns": [
{ data: null },
{ data: "field_1",
"defaultContent": ""
},
{ data: "field_2",
"defaultContent": ""
},
...
]
});

oTableAD.on( 'row-reorder', function ( e, details, changes ) {
    editorAD
        .edit( changes.nodes, false, {
            submit: 'changed'
        } )
        .multiSet( changes.dataSrc, changes.values )
        .submit();
} );

Regards to all

This question has accepted answers - jump to:

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75
    Answer ✓

    Can you properly format the code please?.. instructions are right below the input box for replies

  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin
    Answer ✓

    Could you try using the nightly version of RowReorder please.

    Allan

This discussion has been closed.