pass data object to editor.edit()
pass data object to editor.edit()
I have already created my editor but want to edit data that is not in a datatables list but in a simple list created using jquery. So this is not possible:
var sele = $('#row_' + a.getAttribute('data-workid'));
editor.title(
'Details'
).buttons({
"label": "Update",
"className": "btn",
"fn": function() {
editor.submit()
}
}).edit(sele);
but is something like this possible, to pass an object to editor item as a data source?
editor.title(
'Details'
).buttons({
"label": "Update",
"className": "btn",
"fn": function() {
editor.submit()
}
}).edit(someDataObject);
This discussion has been closed.
Answers
The way to do this is to use the
val()orfield().val()method to set the values to be edited. There is no option to pass a data object intoedit()- it will always take an identifier to be edited.Allan