在afterrender监听器之后,ExtJS属性网格不显示

时间:2015-06-16 13:19:25

标签: javascript extjs

我有一个属性网格我正在创建一个我有一个关于“afterrender”的监听器看起来像这样:

afterrender: function(){

                console.log(record);
                // im trying to get the record
                var gridValues = this.getSource();
                var store = this.getStore('teamMembers');
                store.clearFilter(true);
                store.addFilter({property: 'teamName', value: teamName});
                store.addFilter({property: 'periodName', value: gridValues.periodName});
                /*
                var store = this.getStore('teamMembers');
                store.clearFilter(true);
                store.addFilter({property: 'teamName', value: teamName});
                store.addFilter({property: 'periodName', value: gridvalues.periodName});
                */


                console.log(gridValues.resourcedFte);
                console.log(store.count());
                //this.getRecord();

我的功能正常工作并且正在执行我现在要做的事情,但是在它触发后我的属性网格没有显示在我的视图中。我尝试过使用doLayout()但是没有用。

编辑:我的网格的完整代码是:

var tempPropGrid = me.getView().add(
    {
        xtype:'propertygrid',
        width: 80,
        header: false,
        title: 'prop grid',
        //for some reason the headers are not hiding, we may need to deal with this using CSS
        //hideHeaders: true,
        enableColumnResize: false,
        sortableColumns: false,
        nameColumnWidth: 1,
        source: record.data,
        sourceConfig: {

            periodScrumMaster: {
                editor: Ext.create('Ext.form.ComboBox', {
                    store: team,
                    queryMode: 'local',
                    displayField: 'personName',
                    valueField: 'personName',
                    listeners: {
'expand' : function(combo) {
                            var gridvalues = this.up('propertygrid').getSource();
                            combo.getStore().clearFilter(true);
                            combo.getStore().addFilter({property: 'teamName', value: teamName});
                            combo.getStore().addFilter({property: 'periodName', value: gridvalues.periodName});
                            var totalFTE = team.count();
                            console.log(totalFTE);
                        },
                    }}),
                displayName: 'Scrum Master'
            },

0 个答案:

没有答案