I am using Kendo UI to implement a couple of comboboxes on my page. The second combobox relies on the value of the first to populate, but I do not want to use the "Cascade" option, since the second combobox should not ever be disabled.
My issue is the following:
On change of combobox A, combobox B should populate with appropriate values in its dropdown, but the box itself should be clear. I clear the text and value of Combobox B, but when I run a datasource Read or anything, the combobox is refilled with old text.
Subentity is Combobox B:
var subentity = $('#subentity').getKendoComboBox();
$("#subentity").val(null);
subentity.value(null);
subentity.dataSource.data({});
subentity.text('');
I have tried several options, and moving where the values are cleared around, and can't seem to get it to work.
Any ideas? Thank you!
EDIT: Combobox B (subentity) is initialized as follows:
$("#subentity").kendoComboBox({
placeholder: "--- Enter a Sub-Entity ---",
autoBind: false,
animation: false,
dataSource: {
type: "json",
serverFiltering: true,
transport: {
read: {
url: ResolveUrl('~/Entity/GetSubentities')
},
parameterMap: function () {
return {
entityId: $('#hdnEntityId').val(),
subentityName: $("#subentity").data("kendoComboBox").text()
}
}
}
},
dataTextField: "Name",
dataValueField: "Id",
delay: 500,
change: onChangeOfSubentityCombo,
filter: "contains",
suggest: true,
value: $('#hdnSubentityName').val()
});