Buttons on ModalView Are Not enabled on second time

3 posts, 1 answers
  1. goex
    goex avatar
    4 posts
    Member since:
    Mar 2014

    Posted 18 Apr 2014 Link to this post

    I have a view which has a listview inside. When I click on an item a ModalView which shows the detail is opening. When I click remove, the item is being removed. 

    My problem is, when I click on an item inside the listview, the dialog is openning again with the related data but the button is not enabled.

    What am I doing wrong?

    function closeModalViewRemove() {
       
      $("#modalview-app-remove").kendoMobileModalView("close");

    };


    function deleteFromJson() {
     
      var $app_list = localStorage.getItem('LsAppList');
      var AppListJson = JSON.parse($app_list);

        jQuery.each(AppListJson, function(i, val) {
                                             if (AppListJson[i].extapp_id == appdetail.get("addAppId"))
    {    
        AppListJson.splice([i], 1);
    $app_list = JSON.stringify(AppListJson);
    localStorage.setItem('LsAppList',$app_list);
    closeModalViewRemove();
     
    }
    }); 


    }
  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 21 Apr 2014 Link to this post

    Hi Goex,

    The problem most probably comes from the incorrect closing of the ModalView. In your closeModalViewRemove() function you are not closing the ModalView, but initializing it again, which is not supported. Pleae check the following API reference on the correct way to close the ModalView:

    http://docs.telerik.com/kendo-ui/api/mobile/modalview#methods-close

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. goex
    goex avatar
    4 posts
    Member since:
    Mar 2014

    Posted 21 Apr 2014 in reply to Kiril Nikolov Link to this post

    thank you Kiril.. 
Back to Top