Customized control button modification
Customized control button modification
Is it possible to have this example here https://editor.datatables.net/examples/api/triggerButton.html but with the ability to submit multiple rows at once. I tried this but only the first row is passed, even when multiple rows are selected:
buttons: [
{ extend: "edit", editor: editor },
{
extend: "selectRows",
text: "Submit Selected Item(s)",
action: function ( e, dt, node, config ) {
var workOb = request_count_table.row( { selected: true } ).data().work ;
console.log( workOb.work_id ); //only one value is logged even though multiple rows were selected.
}
]
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Sure - instead of extending the
selectedSinglebutton type, you would extendselectedand userows()rather thanrow().You'd probably also need to use a little loop with
multiGetandmultiSetto set the values of each individual row, unless you want to set a common value, in which case just useval().Allan