小编yhl*_*lee的帖子

如何在kendo网格中获取当前排序字段?

我是初学者...我正在使用Jndo的kendo-grid.

我想在kendo-gird中获取当前排序的字段.

我找到了这个.的console.log(grid.dataSource._sort [0] .DIR); 的console.log(grid.dataSource._sort [0]点域);

我可以找到其他方式吗?

这是我的代码.

        var dataSource = new kendo.data.DataSource({
        transport       : {
            read        : {
                type        : 'post',
                dataType    : 'json',
                contentType : 'application/json;charset=UTF-8',
                url         : cst.contextPath() + "/watcher/kendoPagination_statsErrorHistoryRetrieveQry.htm",
                data        : param
            },
            parameterMap: function (data, opperation) {
                return JSON.stringify(data);
            }
        },
        schema          : {
            data    : function(data) {
                return data;
            },
            total   : function(response) {
                return response.length > 0 ? response[0].TOTAL_COUNT : 0;
            }
        },
        pageSize        : cst.countPerPage(),
        serverPaging    : true,
        serverSorting   : true …
Run Code Online (Sandbox Code Playgroud)

kendo-ui kendo-grid

2
推荐指数
1
解决办法
3246
查看次数

标签 统计

kendo-grid ×1

kendo-ui ×1