This is a migrated thread and some comments may be shown as answers.

Modifying the property of an array inside of an array and have it show up on the UI?

1 Answer 38 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 23 Oct 2012, 12:08 AM
Please see the JS fiddle here: http://jsfiddle.net/zWjaD/6/
How come the update to the name property is not being reflected on the UI?

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 23 Oct 2012, 06:58 AM
Hello,

 Because you are not updating the right property. The original code is 

this.ranks[0].set("name", name);    

However the items of the ranks array don't have a "name" property. They have "id" and "person". You need to use 
this.ranks[0].set("person.name", name);    

Here is the updated fiddle: http://jsfiddle.net/zWjaD/9/

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MVVM
Asked by
Brandon
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or