ExtJS列分组在EditorGridPanel中是如何工作的?

ExtJS列分组在EditorGridPanel中是如何工作的?,extjs,grid,extjs3,Extjs,Grid,Extjs3,“EditorGridPanel”中的“ExtJS”列分组是如何工作的?例如,在这个例子中:'',它似乎不是真的工作,但它在“简单网格面板”中对我来说工作良好 Ext.apply(this, { store: new Ext.data.Store( { reader: new Ext.data.JsonReader(

“EditorGridPanel”中的“ExtJS”列分组是如何工作的?例如,在这个例子中:'',它似乎不是真的工作,但它在“简单网格面板”中对我来说工作良好

Ext.apply(this,
            {
                store: new Ext.data.Store(
                    {
                        reader: new Ext.data.JsonReader(
                            {
                                id: '"ID"',
                                totalProperty: 'totalCount',
                                root: 'rows',
                                fields: [
                                    { name: 'ID', type: 'string' },
                                    { name: 'organizationID', type: 'string' },
                                    { name: 'StructureID', type: 'string' },
                                    { name: 'Type', type: 'string' },
                                    { name: 'PropID', type: 'string' },
                                    { name: 'ProtectedSurface', type: 'string' },
                                    { name: 'Content', type: 'string' },
                                    { name: 'CPType', type: 'string' },
                                    { name: 'Location', type: 'string' },

                                ]
                            }),
                        proxy: new Ext.data.HttpProxy({ url: this.url }),
                        baseParams: { cmd: 'getData1', objName: this.objName, aad: Ext.getCmp('clientidforStr').getValue() },
                        sortInfo: { field: '"ID"', direction: 'ASC' },
                        remoteSort: true,
                        mode: 'local',
                        autoLoad: true,
                        listeners: {
                            load: {

                                scope: this, fn: function (store) {
                                    // keep modified records accros paging
                                    var modified = store.getModifiedRecords();
                                    for (var i = 0; i < modified.length; i++) {
                                        var r = store.getById(modified[i].id);
                                        if (r) {
                                            var changes = modified[i].getChanges();
                                            for (p in changes) {
                                                if (changes.hasOwnProperty(p)) {
                                                    r.set(p, changes[p]);
                                                }
                                            }
                                        }
                                    }
                                    //alert(Ext.getCmp('areaidforStr').getValue());

                                }
                            },
                            exception: function (proxy, type, action, options, response, arg) {
                                if (response.responseText != '') {
                                    Ext.Msg.alert('From getData Command', response.responseText);
                                }
                                //this.showError(response.responseText, 'from getData Command:');
                                //alert(response.responseText + '\n from getData Command ');
                                console.log(response);
                                if (type === 'remote') {
                                    // success is false
                                    // do your error handling here
                                    alert('error' + response);
                                    console.log(response); // the response object sent from the server
                                }
                            }
                        }
                    }),
                features: [{
                    groupHeaderTpl: 'Subject: {Location}',
                    ftype: 'groupingsummary'
                }],
                columns: [
                    {
                        header: 'ID',
                        id: 'ID',
                        dataIndex: 'ID',
                        hidden: true,
                        hideable: false,
                        sortable: true,
                        editor: new Ext.form.TextField({ allowBlank: false })
                    },

                    {
                        header: 'Structure Group',
                        id: 'StructureID',
                        dataIndex: 'StructureID', editable: false,
                        width: 45,
                        sortable: true,
                        editor: comboStructureAreaRelation,
                        renderer: Ext.util.Format.comboRenderer(comboStructureAreaRelation, AssignedGridStoreforStr)
                    },
                    {
                        header: 'Structure',
                        dataIndex: 'Type',
                        id: 'Type', editable: false,
                        width: 45,
                        sortable: true,
                        editor: StructureTypeCombo,
                        renderer: Ext.util.Format.comboRenderer(StructureTypeCombo, StorestrructureType)
                    },
                     {
                         header: 'Asset ID',
                         dataIndex: 'PropID', editable: false,
                         id: 'PropID',
                         width: 60,
                         sortable: true,
                         editor: new Ext.form.TextField({ allowBlank: false, cls:'textStyle' })

                     },
                     {
                         header: 'Protected Surface',
                         dataIndex: 'ProtectedSurface',
                         id: 'ProtectedSurface',
                         editable: false,
                         width: 45,
                         sortable: true,
                         editor: ComboTankProtectedSurface,
                         renderer: Ext.util.Format.comboRenderer(ComboTankProtectedSurface, storeTankProtectedSurface)
                     },



                     {
                         header: 'DATA EX',
                         id: 'ProtectedSurface11',
                         columns: [
                        {
                            header: 'Asset ID',
                            dataIndex: 'PropID', editable: false,
                            id: 'PropID11',
                            width: 60,
                            sortable: true,
                            editor: new Ext.form.TextField({ allowBlank: false, cls: 'textStyle' })

                        },
                     {
                         header: 'Protected Surface',
                         dataIndex: 'ProtectedSurface',
                         id: 'ProtectedSurface11',
                         editable: false,
                         width: 45,
                         sortable: true,
                         editor: ComboTankProtectedSurface,
                         renderer: Ext.util.Format.comboRenderer(ComboTankProtectedSurface, storeTankProtectedSurface)
                     },


                         ]

                     },





                    {
                    header: 'Content',
                    dataIndex: 'Content', editable: false,
                    id: 'Content',
                    width: 60,
                    sortable: true,

                    },
                    {
                    header: 'CP Type',
                    dataIndex: 'CPType', editable: false,
                    id: 'CPType',
                    width: 60,
                    sortable: true,

                    },

                    {
                    header: 'Location',
                    dataIndex: 'Location', editable: false,
                    id: 'Location',
                    width: 60,
                    sortable: true,

                    },
Ext.apply(此,
{
存储:新的Ext.data.store(
{
阅读器:新的Ext.data.JsonReader(
{
id:““id”,
totalProperty:“totalCount”,
root:'行',
字段:[
{name:'ID',type:'string'},
{name:'organizationID',键入:'string'},
{name:'StructureID',type:'string'},
{name:'Type',Type:'string'},
{name:'PropID',type:'string'},
{name:'ProtectedSurface',键入:'string'},
{name:'Content',type:'string'},
{name:'CPType',type:'string'},
{name:'Location',type:'string'},
]
}),
proxy:new Ext.data.HttpProxy({url:this.url}),
baseParams:{cmd:'getData1',objName:this.objName,aad:Ext.getCmp('clientdforstr').getValue()},
sortInfo:{字段:''ID',方向:'ASC'},
remoteSort:是的,
模式:“本地”,
自动加载:对,
听众:{
负载:{
范围:本,fn:功能(存储){
//将修改过的记录保存在页面中
var modified=store.getModifiedRecords();
对于(变量i=0;i