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

Buttons on ModalView Are Not enabled on second time

2 Answers 47 Views
Button (Mobile)
This is a migrated thread and some comments may be shown as answers.
goex
Top achievements
Rank 1
goex asked on 18 Apr 2014, 08:23 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Nikolov
Telerik team
answered on 21 Apr 2014, 12:14 PM
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!
 
0
goex
Top achievements
Rank 1
answered on 21 Apr 2014, 02:59 PM
thank you Kiril.. 
Tags
Button (Mobile)
Asked by
goex
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
goex
Top achievements
Rank 1
Share this question
or