Rebinding viewmodel by using kendo.unbind then kendo.bind

2 posts, 0 answers
  1. Nick Kulshrestha
    Nick Kulshrestha avatar
    3 posts
    Member since:
    Aug 2009

    Posted 22 Oct 2013 Link to this post

    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.
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2596 posts

    Posted 24 Oct 2013 Link to this post

    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!
Back to Top