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

Rebinding viewmodel by using kendo.unbind then kendo.bind

1 Answer 611 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Nick Kulshrestha
Top achievements
Rank 1
Nick Kulshrestha asked on 22 Oct 2013, 02:55 PM
I am having trouble unbindng unbinding an existing view model and rebinding a new view model. The scenario I am using is that the original page comes down from the server and the view model data is bound to the html elements using kendo.bind. Later an action is triggered which converts the viewmodel to a javascript object and sends it to the server as a json request. The server does its work and sends the view model back down at which point I call kendo.observable on the returned object and attempt to rebind it to the existing ui.

Currently I am calling kendo.unbind(viewDiv) then kendo.bind(viewDiv, viewModel) but nothing appears to happen. Is there something I am missing.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 24 Oct 2013, 11:16 AM
Hi Nick,

I was not able to reproduce the issue that you are describing. And the unbind method works as expected. Please check the following example:

http://jsbin.com/IfIkobo/1/edit

If the problem still persists, please extract a sample, showing that we can investigate locally. 
 
Regards,
Kiril Nikolov
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
Nick Kulshrestha
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or