Editor buttons callback function
Editor buttons callback function
YudsTable
Posts: 6Questions: 3Answers: 0
Thank you for come here ,
How to rewrite the call back function of (new,edit,remove) buttons,and close the modal after submit , and is there any more attributes for buttons such ad formButtons and formMessage. Can I modify the editor like this way:
editor = new $.fn.dataTable.Editor( {
"ajax": {
"url": "${pageContext.request.contextPath}/index/add",
"data": {
"name":"asdfdsf"
},
success:function(){
this.close();
}
}
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
You should not override the
success
method of theajax
option (which is noted in theajax
documentation). Doing so would replace Editor's own success method and thus cause issues.The modal should submit automatically after edit, if it is not, then likely the server is not returning data in the expected JSON format.
Can you link to the page showing the issue so I can double check that?
Allan