Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
813 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...