Edit this page

set

Sets the value of the specified field.

Parameters

name String

The name of the field whose value is going to be returned.

value Number |String |Date |Object

The new value of the field.

Example - set the value of a field

<script>
var observable = new kendo.data.ObservableObject({ name: "John Doe" });
observable.set("name", "Jane Doe"); // set the value
console.log(observable.get("name")); //outputs the new value "Jane Doe"
</script>

Example - set the value of a nested field

<script>
var observable = new kendo.data.ObservableObject({ person: { name: "John Doe" } });
observable.set("person.name", "Jane Doe"); // set the value
console.log(observable.get("person.name")); //outputs the new value "Jane Doe"
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy