Editing a field programmatically
Editing a field programmatically
GeorgeHelmke
Posts: 44Questions: 16Answers: 0
This is my feeble attempt at editing a field programmatically:
editor
.create(false)
.set('No_', '20100')
.submit();
It goes wrong because on that one field is filled in, and all of the other fields are NULL.
I am able to do this:
$('#MainTable tbody ').on('click', 'button', function (event) {
var row = $(this).closest("tr").get(0);
var aData = table.row(row).data();
aData.No_ = "20100";
But it doesn't get submitted, the new value just shows when I click to edit the field.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
In which case do you need to set the other field values as well? You can call
set()
on as many fields as you need.Or do you actually want the other fields to be
null
? If so, what is the error that you get?Regards,
Allan
The error I get is at the SQL level - these fields need to be filled in.
An example would really help, so I could see how it is done and then fit the concepts to my situation.
Hi,
To use the
set()
method to fill in other fields you would simply do:Repeating the call to
set()
as needed (with the field and values changed to suit your needs of course!).Allan
Even I am smart enough to understand that. Thanks!