剑道移动 - 无法刷新ModalView关闭列表视图 [英] Kendo Mobile - Can not refresh listview on ModalView Close

查看:257
本文介绍了剑道移动 - 无法刷新ModalView关闭列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法刷新列表视图时从该列表视图中添加的或删除行的对话框关闭。

I can not refresh the listview when a dialog which add's or deletes rows from this listview is closes.

我试过几件事情。但下面不工作

I tried several things. but the following does not work

function closeModalViewRemove() {

        $("#modalview-app-remove").kendoMobileModalView("close");
        //--- this is not working -- start ---
              refreshAppList();
        //--- this is not working -- finish ---

};


function refreshAppList() {
    var applist = $('#applist').data('kendoMobileListView');
    applist.dataSource.read();   
    applist.refresh();
}

我在做什么错了?

what am I doing wrong?

推荐答案

以下code应该做的伎俩。

The following code should do the trick.

 $("#applist").data("kendoMobileListView").refresh()

检查文件上刷新的更多信息: HTTP://docs.telerik。 COM /剑道的UI / API /移动/列表视图

Check documentation on refresh for further information: http://docs.telerik.com/kendo-ui/api/mobile/listview

荫不知道为什么你已经使用datasource.read()。此功能只能如果您有加载到列表视图里面的模板动态数据的项目中使用并且要删除源本身项目,以后每次读取源项目的其余部分在关闭模式view.Inorder要删除的行该行的ListView和显示器休息,与列表视图的ID只调用刷新功能就足够了。

Iam not sure why you have used datasource.read(). This function can be used only if you have dynamic data items that are loaded into a template inside the listview and you are deleting items in the source itself and reading rest of the source items after each time you close modal view.Inorder to delete row of a listview and display rest of the rows,just calling refresh function with id of the listview is enough.

这篇关于剑道移动 - 无法刷新ModalView关闭列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆