Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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
Sorting extjs5网格组排序_Sorting_Extjs_Grid_Grouping - Fatal编程技术网

Sorting extjs5网格组排序

Sorting extjs5网格组排序,sorting,extjs,grid,grouping,Sorting,Extjs,Grid,Grouping,在我的应用程序中,我有一个启用分组的网格。当网格出现时,组按升序(默认)排序。我不希望我的网格组被排序 组的排列方式应确保数据来自数据库。数据以正确的顺序从数据库中输入。但是,排序是在存储级别进行的 在网格中,我使用这个 features: [{ ftype: 'grouping', groupHeaderTpl: '{name}', enableNoGroups:true, depthToInden

在我的应用程序中,我有一个启用分组的网格。当网格出现时,组按升序(默认)排序。我不希望我的网格组被排序

组的排列方式应确保数据来自数据库。数据以正确的顺序从数据库中输入。但是,排序是在存储级别进行的

在网格中,我使用这个

features: [{
            ftype: 'grouping',
            groupHeaderTpl: '{name}',
            enableNoGroups:true,
            depthToIndent: 20
        }]
groupField: 'groupName'
在商店里我用这个

features: [{
            ftype: 'grouping',
            groupHeaderTpl: '{name}',
            enableNoGroups:true,
            depthToIndent: 20
        }]
groupField: 'groupName'
我甚至试着在我的商店里使用这些配置

remoteGroup:true,
remoteSort: false
有什么帮助吗?

我创建它是为了测试您遇到的问题,我注意到默认情况下它是按分组字段排序的

我在商店中遇到了
groupDir
config选项,分组总是对
ASC
DESC
进行排序,它默认为
ASC
,您可以考虑创建自己的函数来覆盖
sorterFn

分组和排序将明显地重新安排元素的顺序,您可能需要复制服务器前端的排序逻辑。启用remoteSort应有助于对其他列进行排序。

我创建此选项是为了测试您遇到的问题,我注意到默认情况下它是按分组字段排序的

我在商店中遇到了
groupDir
config选项,分组总是对
ASC
DESC
进行排序,它默认为
ASC
,您可以考虑创建自己的函数来覆盖
sorterFn


分组和排序将明显地重新安排元素的顺序,您可能需要复制服务器前端的排序逻辑。打开remoteSort应有助于对其他列进行排序。

您需要在
存储中添加
remoteSort:true
。例如:

Ext.define('store', {
  extend: 'Ext.data.Store',
  requires: 'model',
  model: 'model',
  groupField: 'groupField',
  remoteSort: true
});

您需要在
store
中添加
remoteSort:true
。例如:

Ext.define('store', {
  extend: 'Ext.data.Store',
  requires: 'model',
  model: 'model',
  groupField: 'groupField',
  remoteSort: true
});

您可以将grouper.sorterFn设置为Ext.emptyFn以禁用排序

例如:


您可以将grouper.sorterFn设置为Ext.emptyFn以禁用排序

例如:


我也面临同样的问题。这个解决方案对你有帮助吗?这没用me@Scriptable:你能演示一下我们如何编写自定义组分类器吗?我还需要类似的问题。检查这个问题:我面临同样的问题。这个解决方案对你有帮助吗?这没用me@Scriptable:您能演示一下我们如何编写自定义组分类器吗?我还需要类似问题中给出的内容。请检查此问题: