data row disappear after inline edit

data row disappear after inline edit

nlbydesignnlbydesign Posts: 5Questions: 0Answers: 0
edited July 11 in Editor

Description of problem: I created a data table with inline edit function following this example (https://editor.datatables.net/examples/inline-editing/join.html), and add a drop down box for the "side" variable. Everything works beside any row that I edited, they disappear.
I have attached front and back end files.
Thanks for the help.

Replies

  • kthorngrenkthorngren Posts: 16,790Questions: 25Answers: 3,979

    Start by verifying the Editor's response using the browser's network inspector tool. You should see a request and response similar to this doc. Are you seeing the correct response? Maybe post the response JSON in this thread.

    If the correct response is returned then it should be displayed in the table. However, the table's current sorting and searching may make the row not visible. Does it show on another page?

    Kevin

  • nlbydesignnlbydesign Posts: 5Questions: 0Answers: 0

    hmmm.. I'm not sure if this is what you meant.
    the data that I changed in the table was saved, it just disappears right after I edit and I have to refresh the page in order to see it again.

  • nlbydesignnlbydesign Posts: 5Questions: 0Answers: 0


  • kthorngrenkthorngren Posts: 16,790Questions: 25Answers: 3,979

    You are getting two errors. You will need to do some debugging around line 729 of your staging file to see what variable is null.

    You are also getting this error:

    Unable to automatically determine field from source. Please specify the field name

    Use the debugging steps in the link provided to troubleshoot the issue. YOu will probably need to use the editFiled property:
    https://datatables.net/manual/tech-notes/11

    Kevin

  • kthorngrenkthorngren Posts: 16,790Questions: 25Answers: 3,979

    Please post your Javascript Editor and Datatables init code. We might be able to help you with the Unable to automatically determine field from source error.

    Kevin

  • nlbydesignnlbydesign Posts: 5Questions: 0Answers: 0



    would you prefer the files?

  • allanallan Posts: 56,837Questions: 1Answers: 9,034 Site admin

    The Editor initialisation isn't shown, but I'd guess that workorder is not being set as a parameter in the submitted data, which would cause the where condition to fail to match the new record, and thus not show it.

    You would need a similar ajax.data function for your Editor options, or use preSubmit.

    Allan

  • nlbydesignnlbydesign Posts: 5Questions: 0Answers: 0


    I kind of have it figured out by changing the event (.on('submitComplete').
    It works fine when I edit one by one but let's say (on second picture) I was going to change the first row but then I change my mind and click other row, I won't be able to edit anymore until I reload the page.
    Thanks for the help.

  • mloomloo Posts: 4Questions: 1Answers: 0

    What helped me was getting the editor's idSrc set to the value that keeps all the rows straight.

    idSrc: 'name',

    Once I picked the unique identifying column, rows stopped hiding, moving around, or becoming nonfunctional after being freshly added or edited.

Sign In or Register to comment.