Hello,
I often use custom editors.
But when using the dropdown list
$ ("# ..."). data ('kendoDropDownList');
I need to access the editor in the form, but I don't know what goes into # ...
If you created this editor statically, you would have an ID, but if you create a custom one, you will not have a separate ID.
My custom editor looks like this, and the ID I tried was the same as the string output in options.field.
dayDropDownEditor : function (container, options) {
$('<
input
id
=
"operDay"
data-bind
=
"value:' + options.field + '"
/>')
.appendTo(container)
.kendoDropDownList({
suggest: true,
dataSource: [
{name:'월', operDay: '월요일', isDeleted: true },
{name:'화', operDay: '화요일', isDeleted: false },
{name:'수', operDay: '수요일', isDeleted: true },
{name:'목', operDay: '목요일', isDeleted: false },
{name:'금', operDay: '금요일', isDeleted: false },
{name:'토', operDay: '토요일', isDeleted: false },
{name:'일', operDay: '일요일', isDeleted: false }
],
dataTextField: 'operDay',
dataValueField: 'operDay',
valuePrimitive: true,
select: function(e){
alert(JSON.stringify(options.field));
},
change: function(e) {
},
template: kendo.template($("#template").html())
});
}
"fn1": function() {
var dropdown = $("#operDay").data("kendoDropDownList");
var oranges = dropdown.dataSource.get(2);
oranges.set("isDeleted", true);
}
What data should be inside # ... for me to access .data ('kendoDropDownList')?