data row disappear after inline edit
data row disappear after inline edit
nlbydesign
Posts: 5Questions: 0Answers: 0
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
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
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.
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:
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
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
would you prefer the files?
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 thewhere
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 usepreSubmit
.Allan
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.
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.