user defined button
user defined button
MadMax76
Posts: 149Questions: 33Answers: 1
I try to figure out how to create a button like this:
buttons: [
{ extend: 'selectedSingle',
text: 'Kopieren',
editor: editor,
action: function ( data ) {
ajax_call('__plugName__', 'kopieren', data.AR_Header.Re_Nummer_intern); }},
```
the column
{data: "AR_Header.Re_Nummer_intern"}, //4
```
does exist and works - but in the function I try to call there is no value showing. I also tried data.column(4) and other things, none worked....
Thanks
Max
This question has an accepted answers - jump to answer
Answers
The
buttons.buttons.action
docs explain the parameters used for the custom button function. There is nodata
parameter passed. You will need to get the selected row via the API. See the docs forselectedSingle
for how to get the row data.Kevin
Hi Kevin,
thanks, but none of the links (and some further search) provides an example of a single field to be read - all go for the whole row.
Please...
Thanks
Max
You can use the
selector-modifier
value of{selected: true}
, something like:Colin