twice update

twice update

andresendoandresendo Posts: 5Questions: 3Answers: 0
edited June 2023 in Editor

Hello,

its a little bit complicated to describe:

A datatable with editor and server side data. I build always show input,select2 etc. fields in a blur submit table.
Works very good. But the datatable updated every time the full table and not only the edited row. That is not the perfect usability.

I found out that my server side script called twice, one time with the edit call and this deliverys also the edited row back. But after this the datatable calls the script again for all rows.

I make this for "normal" input field:

     $('#AuftragPositionen').on( 'change', 'input.editor-active', function (e) {
                    editor2
                            .edit( $(this).closest('tr'), false )
                            .set( $(this).attr('id'), $(this).val())
                            .submit();
                            //alert('test');
                } );

I know its not easy to say with out the full code. But the table has many functions ;)

Ah and one other hint.. the ""drawCallback": function ( settings ) {" is called only with the full data (second call).

I hope you understand my englisch ;)

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Do you have server-side processing enabled perhaps? That will cause one Ajax call to submit the data and then another to draw the table with the latest data.

    Allan

Sign In or Register to comment.