I'm using a kendo.data.ObservableObject, and want to change two attributes at once (so the change-event doesn't get fired twice). I'm not sure of the syntax (background.set('id', backgroundId)
for a single attribute), and the documentation isn't of much help. Any help?
Thanks!
You cannot set more than one attribute at once. You need to call the set
method twice.
If you just want to avoid triggering the change event assign the attribute without using the set
method:
model.foo = "foo" ; // won't trigger "change"
model.set("bar", "bar"); // will trigger "change"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With