开发者

Ext Js Listview columns are not hiding or widening properly

I have an Ext Js listview that I am attempting to get rid, or make my Id column smaller. Right now it's the following code

    this.relList = new Ext.list.ListView({
        singleSelect: true,
        store: this.buildStore(),
        columns: [{
 开发者_运维知识库           header: 'Id',
            dataIndex: 'Id',
            hidden: true
        }, {
            header: 'Name',
            dataIndex: 'Name',
        }]
    });

When this ListView is displayed, it still shows the Id column even though I told it to hide it. Furthermore, if I change the hidden:true to width: 1 to make the Id column small, the Name column no longer shows and the Id column takes up the whole listview.

How can I hide this column?


Why use the Id column at all? you can access the data via record.data or through the store itself and do not need to add it as a column


The API does not list hidden as a valid property for each object in the columns config. http://dev.sencha.com/deploy/dev/docs/?class=Ext.list.ListView

From what I see, ListView doesn't support hiding columns. You may need to use a GridPanel.

Like The Scrum Meister said. If you don't need it displayed ever, it shouldn't be listed as a column.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜