Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.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 extjs存储组合框未按预期排序_Sorting_Extjs - Fatal编程技术网

Sorting extjs存储组合框未按预期排序

Sorting extjs存储组合框未按预期排序,sorting,extjs,Sorting,Extjs,在我的extjs项目中,当我加载此存储时。。。它填充组合框,组合框不按排序顺序显示结果。有人能看出我做错了什么吗 Ext.define('ExtApplication4.model.ClientListModel', { extend: 'ExtApplication4.model.Base', requires: ['ExtApplication4.model.Base'], fields: [ { name: 'clientName' }, { name: 'Client

在我的extjs项目中,当我加载此存储时。。。它填充组合框,组合框不按排序顺序显示结果。有人能看出我做错了什么吗

Ext.define('ExtApplication4.model.ClientListModel', {
extend: 'ExtApplication4.model.Base',

requires: ['ExtApplication4.model.Base'],

fields: [
    { name: 'clientName' },
    { name: 'ClientShortCode' }
],

sorters: [
    {
        property: 'clientName',
        direction: 'ASC'
    }
],

sortRoot: 'clientName',
sortOnLoad: true,

proxy: {
    type: 'ajax',
    reader: {
        type: 'json',
        rootProperty: 'data'
    }

您正在
型号上定义分拣机。您应该在
存储
上定义分拣机

小心
remoteSort
属性。它定义存储是本地(在客户端)排序还是远程(在服务器上)排序


此外,您不需要延长课程。

谢谢。。。你说得对。我按商店分类,结果成功了!扩展的课程是我跟随一个教程。。。继承是面向对象编程的基本概念之一。如果您不熟悉OOP,您应该认真阅读它。