I'm trying to put a listbox in a popup editor for a grid. However, whenever I do I get an error. It works fine in forms, base indexes, etc.
Here is an example of the listbox I'm creating. It's very simple and impossible for it to have any object issues/etc. This thing literally should have zero problems.
@(Html.Kendo().ListBox()
.Name("optional")
.Toolbar(toolbar =>
{
toolbar.Position(Kendo.Mvc.UI.Fluent.ListBoxToolbarPosition.Right);
toolbar.Tools(tools => tools
.TransferTo()
.TransferFrom()
.TransferAllTo()
.TransferAllFrom()
.Remove()
);
})
.ConnectWith("selected")
.BindTo(new List<string>() { "Test", "Test 2" })
)
@(Html.Kendo().ListBox()
.Name("selected")
.BindTo(new List<string>())
.Selectable(ListBoxSelectable.Multiple)
)
However, when it's placed inside a template in the EditorTemplates folder I get this javascript error:
kendo.all.js:9244 Uncaught TypeError: e.value is not a function
at init.refresh (kendo.all.js:9244)
at init.bind (kendo.all.js:8485)
at r.applyBinding (kendo.all.js:9486)
at r.bind (kendo.all.js:9436)
at s (kendo.all.js:9579)
at s (kendo.all.js:9588)
at s (kendo.all.js:9588)
at s (kendo.all.js:9588)
at Object.a [as bind] (kendo.all.js:9603)
at init.refresh (kendo.all.js:42964)
I have absolutely no idea why. Can anyone explain to my why this happens or more importantly - how to get a listbox inside the editor popup for a grid?