I need to find refresh values of DropDownList programmatically. That's what I tried:
let nameDropDownList = $('#Configs').getKendoDropDownList();
console.log(nameDropDownList);
console.log(nameDropDownList.datasource);
nameDropDownList.datasource.read();
nameDropDownList.value(currentConfigName);
When read is called, I get:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'read')
Log shows me, that datasource is undefined.
DropDownList definition: @(Html.Kendo().DropDownList()
.Name("Configs")
.DataTextField("Name")
.DataValueField("Name")
.Filter(FilterType.StartsWith)
.DataSource(s =>
{
s.Read(r => r.Action("Read", "FilteringTable"));
}))