inline editing for add/edit +ajax
inline editing for add/edit +ajax
sarath_surisetty
Posts: 54Questions: 13Answers: 0
Hello team
i had implemented DT-Editor for add/edit with ajax and working as expected, but when implemented inline edit,not making any Ajax call and when edited text and click outside the textbox, value reverting back to old value.
->how to make ajax call for inline edit?
ref : https://editor.datatables.net/examples/inline-editing/simple
thaks for the support
This discussion has been closed.
Answers
The ajax call is automatic. Maybe you don't have something setup correctly. Can you post your editor and datatables javascript code?
Kevin
javascript code :
Hi @sarath_surisetty ,
Yep, that's the expected behaviour - by default, it won't submit if you click away. If you want to submit on a blur, you need to specify
onBlur: 'submit'
as in the example here.Cheers,
Colin
added the below line but no luck:
//Activate an inline edit on click of a table cell
$('#xyzListDataTables').on( 'click', 'tbody td.editable', function (e) {
xyzEditor.inline( this, {
onBlur: 'submit'
} );
not passing data to PUT as json object,would like to make ajax with json object for inline edit,since the select-edit is ajax/json
Maybe the data submitted is not included for your edit ajax function:
I would start byusing some debugs to see what
editData
contains when inline editing. Maybe you need to use theallifchanged
option when submitting your inline edit:https://editor.datatables.net/reference/type/form-options#submit---What-values-should-be-submitted-to-the-server
Kevin
hi now able to PUT successfully with expected json but got the error when table refresh data showing continuously processing.
code :
$('#xyzListDataTables').on( 'click', 'tbody td.editable', function (e) {
xyzEditor.inline( this, {
onBlur: 'submit',
submit: 'allIfChanged'
} );
} );
error in firebugs is
That's not an error I'm familiar with. Can you link to a page showing the issue please? It would also be useful if you could show the JSON being returned from the server after the edit.
Thanks,
Allan
hi allan
im running on the local host, but attached the screenshot of fire bug when edit inline called.
Can you run the debugger on your table and give me the debug code please?
Allan
hi looks like when i acquired license for solo and upgraded library but still same problem,
after editing table show processing
bug debugger can be found here : https://debug.datatables.net/ayusuz
also have two more issues:
-> at the debug link given ,Table (#propertyListDataTables),add button works fine but edit button shows error
uncaught exception: Unable to find row identifier For more information, please refer to https://datatables.net/tn/14
can u help in finding the issue?
-> and for select2 +ajax, what is the responce expected by the select2 for binding data and will the select2 will retain with data when edit is called?
-> at the debug link given ,Table (#propertyListDataTables),add button works fine but edit button shows error
uncaught exception: Unable to find row identifier For more information, please refer to https://datatables.net/tn/14
i resolved please ignore,
would like to fix,other two points:
1)for select2 +ajax, what is the responce expected by the select2 for binding data and will the select2 will retain with data when edit is called?
2)inline edit bug ! TypeError: node is undefined at dataTab....min.js (line 10, col 81924)
Unfortunately I don't see what is causing the problem there. Could you publish the page on the web somewhere so I can debug it directly please? PM me the URL by clicking my name above and then Send message if you like.
The Select2 documentation for Ajax is available on the Select2 site.
Allan