I keep getting the error "Cannot read property .set of undefined" when I try to update a field from a button. Code is as follows ...
{
extend: 'selectedSingle',
text: 'Change Last Name',
action: function(e, dt, node, config) {
editorMain
.edit( table.row( { selected: true } ).index(), false )
.set( 'LastName', 'Some Last Name' )
.submit();
// editorMain
// .remove(table.row( { selected: true } ).index(), false)
// .submit();
}
If I toggle the comments on the ".remove" and ".set" code, the record is faithfully deleted but I can't seem to make the ".set" code work.
What am I missing?
Dave