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

Nested arrays in view model not updating UI

3 Answers 98 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 14 Nov 2013, 01:42 PM
Hi,

I'm trying to add a new object to a child array, which is contained within another array.

I've created a jsbin to show you exactly what I mean - are you able to help me get the newly pushed child object to display?

I would expect the text "why wont this appear after updating my view model?" to show upon it being pushed into the array but it doesn't render.

http://jsbin.com/enutew/23/edit?html,console,output

Thanks

Will

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 15 Nov 2013, 11:58 AM
Hello Will,

I replied to your support ticket with the same subject. For your convenience, I am providing the answer here, too.I re-wrote your implementation to follow the class based inheritance pattern which is needed for the MVVM to work as expected - please check this updated example.

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Alan
Top achievements
Rank 1
answered on 24 Sep 2015, 03:52 AM
Where is the documentation for kendo.data.ObservableObject.extend()?  In what situations should an extend() be used instead of a normal ObservableObject?  Thank you.
0
Petyo
Telerik team
answered on 25 Sep 2015, 08:04 AM

Hello Alan,

 

the extend method comes from the base kendo.Class. You don't have to use it, in general - the example I gave was created for the particular inquiry. 

 

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