on version 2014.2.1008, I have the following simplified model definition:
while the set event is being triggered as expected, the change event does not.
however, it does trigger when i define it outside of the definition scope as follows:
I'm trying to keep the logic of models grouped together, and that's why i'd rather use the first implementation. any solutions for this?
var
MyModel = kendo.data.Model.define({
id:
"MyModelID"
,
// events
change:
function
(e) {
// do smth here
},
set:
function
(field, value) {
// do smth here
}
}
while the set event is being triggered as expected, the change event does not.
however, it does trigger when i define it outside of the definition scope as follows:
myModel =
new
MyModel(obj);
myModel.bind(
"change"
,
function
(e) {
//do smth here
});
I'm trying to keep the logic of models grouped together, and that's why i'd rather use the first implementation. any solutions for this?