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

MVVM binding does not work properly on Nested Templates with collections

4 Answers 172 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
fbaptiste
Top achievements
Rank 1
fbaptiste asked on 01 Oct 2014, 08:01 PM
Hello I have the following simplified scenario written in JSFIDDLE:


In the following example I'm trying to:
1. remove the first item from the main panels collection (works well).
2. remove the first sub panel from panel1 only (not working).

It's interesting to note that i saw this working on an earlier Kendo version number v2012.1.322 but not on the later ones.

4 Answers, 1 is accepted

Sort by
0
fbaptiste
Top achievements
Rank 1
answered on 01 Oct 2014, 08:02 PM
and here is the link:
http://jsfiddle.net/kob490/L5zd1c8g/10/
0
Petyo
Telerik team
answered on 02 Oct 2014, 03:49 PM
Hello Fred,

I replied to your support ticket regarding the same issue. For your convenience, I am pasting the answer here, too:

mixing jQuery plugin instantiation with MVVM behavior is not recommended, and may have worked by accident in earlier versions. The recommended way to implement such behavior would be like this

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Keith
Top achievements
Rank 2
Iron
Veteran
answered on 09 Aug 2017, 07:38 PM
Would there be a way to handle the case in your example where the first panel did not have a subPanels:

[{
        panelName: "Panel 1"
    },{.......

Then if the subPanels were then added to the view javascript later, would they update the template view for that one panel?
0
Milena
Telerik team
answered on 11 Aug 2017, 01:09 PM
Hello,

I modified the example as add a button for adding a sub panel to the first panel. You can test it on your side and verify if it helps. 

Regards,
Milena
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MVVM
Asked by
fbaptiste
Top achievements
Rank 1
Answers by
fbaptiste
Top achievements
Rank 1
Petyo
Telerik team
Keith
Top achievements
Rank 2
Iron
Veteran
Milena
Telerik team
Share this question
or