Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Kendo Mobile-将组和服务器端分页功能结合到listview_Html_Listview_Kendo Ui_Datasource_Kendo Mobile - Fatal编程技术网

Html Kendo Mobile-将组和服务器端分页功能结合到listview

Html Kendo Mobile-将组和服务器端分页功能结合到listview,html,listview,kendo-ui,datasource,kendo-mobile,Html,Listview,Kendo Ui,Datasource,Kendo Mobile,我有一个数据源,其中包含特定月份的特定记录。它连接到一个列表视图。是否可以将无休止的滚动、服务器分页和分组结合起来按月显示记录。。每个月只有一个组标题 当前,当数据源检索下一页时,它将添加一个组头,而不管该组头已经显示在上一页上 我能想到的唯一解决方案是将页面大小更改为动态,其中每个页面代表一个月的记录。。。虽然这感觉不是一个干净的解决方案 我目前正在使用JQuery 1.9.1和剑道2013年第1季度发行版。对于任何希望这样做的人来说,目前都不可能开箱即用。我找到了一种方法,通过删除任何重复的

我有一个数据源,其中包含特定月份的特定记录。它连接到一个列表视图。是否可以将无休止的滚动、服务器分页和分组结合起来按月显示记录。。每个月只有一个组标题

当前,当数据源检索下一页时,它将添加一个组头,而不管该组头已经显示在上一页上

我能想到的唯一解决方案是将页面大小更改为动态,其中每个页面代表一个月的记录。。。虽然这感觉不是一个干净的解决方案


我目前正在使用JQuery 1.9.1和剑道2013年第1季度发行版。

对于任何希望这样做的人来说,目前都不可能开箱即用。我找到了一种方法,通过删除任何重复的分组头,然后合并重复的容器,使事情正常进行。使用以下代码绑定到数据源的更改事件:

                setTimeout(function () {
                    var headerMap = {};

                    $($("#listview .km-group-title .km-text").get().reverse()).each(function () {
                        var targetText = $(this).text();

                        if (headerMap[targetText] == null) {
                            headerMap[targetText] = true;
                        } else {
                            // merge any list items from the duplicate container into the next proceeding group container
                            $(this).parent().next("ul").children().prependTo($(this).closest("li").next("li").find("ul"));
                            // remove the (now empty) duplicate container
                            $(this).closest("li").remove();
                        }
                    });
                }, 0);
应该把工作做完!希望这能帮助任何试图同时执行分组、服务器分页和无休止滚动的人