object function in editor name
object function in editor name
yu yen kan
Posts: 65Questions: 31Answers: 0
I have an object
function obj(array){
this.array = array;
this.array_id_list = function(){
var data = [];
for (var i = 0; i < this.array.length; i++) {
data.push(array[i]['id']);
}
return data;
}
}
and an editor
var editor = new $.fn.dataTable.Editor( {
table: "#table",
idSrc: 'id',
fields: [ {
label: "array:",
name: "array_id_list",
multiple: true,
type: "select",
options: [{ label : "abc", value: "1"}, { label: "bcd", value: "2"} ]
}
]
});
but when I edit, the array is not selected at all, why?
This discussion has been closed.
Answers
I don't see how
obj
is being used. Could you give me a link to a page showing the issue please.Thanks,
Allan
Rather than having two conversations about the same thing, let's merge into this one which has more detail. Closing this thread.
Allan