Editable datatable not triggering blur event on changing value to other value after first update
Editable datatable not triggering blur event on changing value to other value after first update
I've a editable data table configured to submit on blur. This works perfectly for any data except the original value for cell.
I'm using the onPreSubmit event and to do other calculation and canceling the submit.For actual submit to server I've separate button for it.
Example:
Suppose I've a cell in a table that has a value 9. Everything works fine when I set value 10. But after setting this value to 10 or any other value it does not let me set back to 9.
Has anyone faced the same issue?
This question has an accepted answers - jump to answer
Answers
No! ... and without your code I am afraid it will be difficult to help ...
Is this using Editor? If so, as you can see here, that doesn't happen normally? Have you checked the browser's console for errors? Or the server?
Colin
Yes, this is using editor with following setting!
I don't see any error in browser console.
I'm using the onPreSubmit event for calculation anc cancel submission at last .No submission until separate button is clicked to submit. The example linked seems its actually saving data after every blur event.
To me it seems like blur event does not gets triggered when value is set to original value. I'm quiet new to datatables. Can anybody please point me if there is somewhere I can look at to verify it?
That's correct. The blur is only called if the data has changed, otherwise it wouldn't need to be sent to the server as there's nothing to update. If you need to trigger something when the blur happens, you can use
preClose
orclosed
instead.Colin
Actually, I need to trigger blur event on every focus out. Is there something I can use?
You can force a submission, with
submit: 'all'
in the form-options, giving you something like:Colin
Thanks colin. This setup worked for me.