Trying to implement bulkedit / multi-row edit. Error: unknown button type: edit
Trying to implement bulkedit / multi-row edit. Error: unknown button type: edit
marcelv
Posts: 27Questions: 6Answers: 0
Hi,
I`m trying to implement this example:
https://editor.datatables.net/manual/multi-row
However, at the moment this does not seem to work. I get Error: unknown button type: edit on load of page.
I already succesfully use other buttons like Print, Edit, New, etc. But for example the current edit button is: editor_edit. The example shows I need to use 'edit', but that throws an error.
How to fix this?
This discussion has been closed.
Answers
Hi,
Have you loaded the Editor Javascript? It is Editor's Javascript that defined the
edit
button type.If you are able to give a link to the page I can take a look.
Allan
Hi,
these are my includes:
Am I missing something? Because I don`t have it online yet (pure locally) I cannot show you at the moment.
This is how I init Editor:
And this is how I init my datatable:
Datatables and editor are working fine, inline edit is working, bubble editing is. Works all great, except for the multi row edit.
Okay - thanks for the code. I see you are using the TableTools extension rather than Buttons.
The name of the button types for TableTools are
editor_edit
,editor_create
andeditor_remove
(like you have for the first and third buttons in your list). There is not TableToolsedit
button type - that is for the Buttons extension.I should note that TableTools has now been retried in favour of Buttons.
Allan
Hi Allan,
Thanks a lot! So you would suggest keep using TableTools, or did I misunderstand that part?
But TableTools does not support multirow editing button, right?
I would suggest using Buttons over TableTools, unless TableTools is deeply embedded in your code. imho Buttons is a huge improvement over TableTools.
Correct.
Allan
Ah, I get it. Thanks! Will see if I can move to Buttons. I'm just using the default datatables buttons such as export CSV, print, select all so won`t be too big of a problem I hope. Thanks again!