Datatables Editor Get Changed Rows

Datatables Editor Get Changed Rows

RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

Hello,

I'm filling the Grid with Array (json Array)
I'm not sending changes to the server.
How I can receive changed Rows on Datatables Editor?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @orka@orka.com.tr ,

    I don't quite follow, but you can use row().data() to get the row's data. If that doesn't help, please could you give more information, please.

    Cheers,

    Colin

  • RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

    Hello Colin,

    Thanks for answer. but Your answer didn't help,

    I'm changing to Rows on ClientSide and not sending to server side.

    I need only changed rows with Editor plugin.

    I need only changed rows to be sent to the server side with manually ajax

  • RahmiIneviRahmiInevi Posts: 19Questions: 5Answers: 0

    var $degisen = [];

                            var $editor = new $.fn.dataTable.Editor({
                                table: "#table_puantaj_listesi"
                                , fields: columns
                                , idSrc: "_KAYITDAMGA"
                            });
    
    $editor.on('submitComplete', function (e, json, data, action) {
                                if (data != undefined) {
                                    $.each($degisen, function (index, value) {
                                        var Deger = value;
                                        if (Deger._KAYITDAMGA == data._KAYITDAMGA)
                                            delete $degisen[index];
                                    });
                                    $degisen.push(data);
                                }
                                return;
                            });
    

    My solution..

    Is there a better method you can suggest?

This discussion has been closed.