Hi,
I have an app that is divided into several parts...to make it simple, let's just consider a menu and a main area.
My menu is created on my main layout file. So I have a kendo.bind(document.body,mainVM) on this page.
My main area has another kendo.bind(document.body,areaVM)
Usually I have a grid on my main area, and because I want to format it nicely, I call the grid.kendoGrid() function on it.
This makes the MVVM go crazy, because it can't track anymore which elements are bound to which vm (mainVM or areaVM).
My grid also goes crazy, as it creates two divs for content, making the layout really bizarre.
I have created a jsfiddle that reproduces the scenario described above. http://jsfiddle.net/aoliveira/WTuYX/2/
I do know that I could fix that by just scoping my kendo.bind call to the given area, but I would like to have at least my mainVM be boud to document.body and have my areaVM boud to some area div...but that seems to create problems also.
So the questions are :
1 - Will there be any way for kendo mvvm to track what is bound to what ?
2 - Is using bind on document.body completely wrong ?
Thanks,
Alvaro Oliveira.
I have an app that is divided into several parts...to make it simple, let's just consider a menu and a main area.
My menu is created on my main layout file. So I have a kendo.bind(document.body,mainVM) on this page.
My main area has another kendo.bind(document.body,areaVM)
Usually I have a grid on my main area, and because I want to format it nicely, I call the grid.kendoGrid() function on it.
This makes the MVVM go crazy, because it can't track anymore which elements are bound to which vm (mainVM or areaVM).
My grid also goes crazy, as it creates two divs for content, making the layout really bizarre.
I have created a jsfiddle that reproduces the scenario described above. http://jsfiddle.net/aoliveira/WTuYX/2/
I do know that I could fix that by just scoping my kendo.bind call to the given area, but I would like to have at least my mainVM be boud to document.body and have my areaVM boud to some area div...but that seems to create problems also.
So the questions are :
1 - Will there be any way for kendo mvvm to track what is bound to what ?
2 - Is using bind on document.body completely wrong ?
Thanks,
Alvaro Oliveira.