Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
824 views
in Technique[技术] by (71.8m points)

extjs - Ext JS grid columns are not formatted if they are hidden by responsive config

columns: {
    defaults: {
        renderer: 'renderer'
    },
    items: [{
        text: 'Item1',
        dataIndex: 'Item1',
        plugins: 'responsive',
        responsiveConfig: {
            'width < 1400': {
                hidden: true
            },
            'width >= 1400': {
                hidden: false
            }
        }
    }, {
        xtype: 'datecolumn',
        text: 'Date',
        dataIndex: 'Date',
        format: 'd.m.Y'
    }, {
        text: 'Age',
        dataIndex: 'age'
    }, {
        text: 'amount',
        dataIndex: 'amount',
        flex: 1,
        plugins: 'responsive',
        responsiveConfig: {
            'width < 1400': {
                hidden: true
            },
            'width >= 1400': {
                hidden: false
            }
        }
    }, {
        xtype: 'actioncolumn',
        text: 'Action',
        items: [{
            handler: 'viewDoc'
        }]
    }]
}

In the renderer method, I have some default functionality to change the style of grid values. If I use responsive config for screensize<1400, then the value in Age is displayed NaN, because the date column gets hidden and its formatter is applied in the Age column. How can I control this wrong formatting of column values?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...