Reputation: 2103
Apologies in advance, I almost never write javascript so this is all very unfamiliar to me. I have a kendo grid with an editable popup for editing records. That popup contains a multiselect where the user can choose multiple cities. If I want to detect if that field has been changed, and set a property on my model for it how do I go about that? Here is the relevant section in my popup edit function, the multiselect is just bound to a standard datasource
editable: "popup",
edit(evt){
var msCities = container.find("#Cities");
msCities.kendoMultiSelect({
dataSource: dsCities
, dataTextField: "City"
, dataValueField: "ID"
});
//msCities.changed?
});
thank you in advance
Upvotes: 0
Views: 63
Reputation: 3293
You can trigger a function adding change: onChangeFunctionName to your multiselect
editable: "popup",
edit(evt){
var msCities = container.find("#Cities");
msCities.kendoMultiSelect({
dataSource: dsCities
, dataTextField: "City"
, dataValueField: "ID",
change: onChangeFunctionName
});
//msCities.changed?
});
onChangeFunctionName function() {
// your function
}
Upvotes: 3