KendoUI ObservableObject: setting multiple attributes

I am using kendo.data.ObservableObject and want to change two attributes at once (so the change event does not fire twice). I am not sure of the syntax ( background.set('id', backgroundId)for a single attribute), and the documentation is not very helpful. Any help?

Thank!

+6
source share
1 answer

You cannot set more than one attribute at a time. You need to call the method settwice.

If you just want to avoid triggering a change event, assign the attribute without using the method set:

model.foo = "foo" ; // won't trigger "change"
model.set("bar", "bar"); // will trigger "change"
+5
source

All Articles