小编Day*_*aya的帖子

是否可以在extjs的gridpanel中显示多个摘要行?

以下是我的代码,显示一个包含总费用摘要的网格面板.我想用平均值显示另一个摘要行.那有什么帮助吗?

    Ext.require(['Ext.data.*', 'Ext.grid.*']);

    Ext.onReady(function() {

    Ext.define('NewEstimate', {
        extend: 'Ext.data.Model',
        fields: ['description', 'cost'],
        validations: [{
            type: 'length',
            field: 'description',
            min: 3
        }, {
            type: 'int',
            field: 'cost',
            min: 1
        }]
    });

    var rowEditing = Ext.create('Ext.grid.plugin.RowEditing');

    var store = Ext.create('Ext.data.Store', {
            autoLoad: true,
            autoSync: false,
            model: 'NewEstimate',
            proxy: {
                type: 'rest',
                url: 'app.php/users',
                reader: {
                    type: 'json',
                    root: 'data'
                },
                writer: {
                    type: 'json'
                }
            },
            listeners: {
                write: function(store, operation){
                    var record = operation.records[0],
                        name = Ext.String.capitalize(operation.action),
                        verb;

                    if (name == …
Run Code Online (Sandbox Code Playgroud)

grid extjs summary gridpanel extjs4

7
推荐指数
1
解决办法
4082
查看次数

标签 统计

extjs ×1

extjs4 ×1

grid ×1

gridpanel ×1

summary ×1