or
Hi, I'm using the kendo form to build an 'order form'.
The form has pre-existing Vendors to select which cascades to a list of pre-existing Sites (Customers).
However, I also need to be able to add sites - which I have done via a POST method.
The issue that I am facing is that after I have done this, I can't figure out how to refresh the 'SiteCode' MultiColumnComboBox - nothing I have tried is able to get the control to populate with the new data, even though i am able to see the new data in the local array that it's being stored in.
I have tried multiple methods of implementing the transportation layer
{
field: "VendorName", editor: "MultiColumnComboBox", label: "Partner/Vendor Name:", validation: { required: true },
delay: 0,
editorOptions: {
placeholder: "Select vendor",
dataTextField: "VendorName",
dataValueField: "VendorCode",
height: 300,
columns: [
{ field: "VendorName", title: "Vendor Name:", width: 300 },
{ field: "VendorCode", title: "Vendor Code:", width: 150 },
{ field: "TerritoryCode", title: "Territory Code:", width: 150 },
{ field: "TerritoryName", title: "Territory Name:", width: 300 },
],
filter: "contains",
dataSource: slData.partners,
},
},
{
field: "SiteName",
label: "Site Name:",
delay: 0,
validation: { required: true },
editor: "MultiColumnComboBox",
editorOptions: {
autoBind: false,
placeholder: "New site name",
dataTextField: "SiteName",
dataValueField: "SiteName",
cascadeFrom: "VendorName",
height: 400,
columns: [
{ field: "VendorCode", title: "Vendor Code:", width: 200},
{ field: "SiteCode", title: "Site Code:", width: 200 },
{ field: "SiteName", title: "Site Name:", width: 300 },
{ field: "warning", width: 200,
template: '<span style="padding: 8px 9px !important;" class="badge-general badge-#:data.Status#">#:data.DaysRemaining# Days Remaining</span>',
headerTemplate: ' '
}
],
filter: "contains",
dataSource: slData.sites,
select: selectSiteName,
noDataTemplate: $("#noDataTemplate").html(),
},
dataBound: function() {
initSiteStatusBadges()
}
}
},
dataSource: {
transport: {
read: createDataURL("Order", "CustomerVendorSite", `&fltVendorCode=${getFormVendorCode()}` ) ,
dataType: "json",
cache: false,
},
filter: { field: "SiteCode", operator: "eq", value: e.data.SiteCode }
},