How to check field value with custom button
How to check field value with custom button
Gargiucn
Posts: 109Questions: 30Answers: 0
I created a custom editor button to check the value of a field before opening the editor.
I didn't understand the correct syntax to use to check the field.
{
extend: 'selectedSingle',
text: 'selectedSingle',
action: function (e, dt, node, config) {
// if field value == value (for example: contratti.con_verif == 1)
alert("Pagamento verificato!");
this.close();
}else{
pagamentiEditor.edit(pagamentiTable.rows('.selected', { select: true }));
}
}
},
Giuseppe
This discussion has been closed.
Replies
The example:
https://datatables.net/reference/button/selectedSingle
shows:
I tried with:
but it's wrong (undefined)...
I solved this way:
I ask the experts for confirmation...
Giuseppe