Extjs 6.5.3从记录值绑定widgetcolumn的隐藏属性

Extjs 6.5.3从记录值绑定widgetcolumn的隐藏属性,extjs,binding,grid,extjs6,Extjs,Binding,Grid,Extjs6,我想显示/隐藏带有记录属性的网格的widgetcolumn 我试图通过绑定我的值来实现这一点: { xtype: 'grid', bind: { store: 'ActionList' }, border: true, flex: 2, name: 'actionList', title: this.titleActionGrid, columns: [{ xtype: 'widgetcolumn',

我想显示/隐藏带有记录属性的网格的widgetcolumn

我试图通过绑定我的值来实现这一点:

{
    xtype: 'grid',
    bind: {
        store: 'ActionList'
    },
    border: true,
    flex: 2,
    name: 'actionList',
    title: this.titleActionGrid,
    columns: [{
        xtype: 'widgetcolumn',
        height: 50,
        width: 65,
        widget: {
            xtype: 'button',
            text: '{sActionTitle}',
            scale: 'large',
            height: 45,
            width: 45,
            margin: 5
        },
        bind: {
            hidden: '{bIsHidden}'
        }
    }]
}
这不起作用,所以我在互联网上搜索,发现了这把小提琴:

所以我尝试了这部分代码:

cell: {
    tools: {
        up: {
            bind: {
                hidden: '{record.bIsHidden}'
            }
        }
    }
}
但那不起作用,事实上小提琴是现代的,我的代码是古典的

我没有找到任何其他东西,这就是为什么我在这里,恳求任何人帮助我;)

提前谢谢你


ExtJS Classic 6.5.3

您可以这样绑定它:

Ext.create('Ext.grid.Panel', {
     renderTo: Ext.getBody(),
     store: store,
     border: true,
     flex: 2,
     name: 'actionList',
     title: this.titleActionGrid,
     columns: [{
             dataIndex: 'id',
         },
         {
             xtype: 'widgetcolumn',
             height: 50,
             width: 165,
             dataIndex: 'hide',
             widget: {
                 bind: {
                     text: '{record.id}',
                     hidden: '{record.hide}'
                 },
                 xtype: 'button',
                 scale: 'large',
                 height: 45,
                 width: 155,
                 margin: 5
             }
         }
     ]
 });

你可以这样装订:

Ext.create('Ext.grid.Panel', {
     renderTo: Ext.getBody(),
     store: store,
     border: true,
     flex: 2,
     name: 'actionList',
     title: this.titleActionGrid,
     columns: [{
             dataIndex: 'id',
         },
         {
             xtype: 'widgetcolumn',
             height: 50,
             width: 165,
             dataIndex: 'hide',
             widget: {
                 bind: {
                     text: '{record.id}',
                     hidden: '{record.hide}'
                 },
                 xtype: 'button',
                 scale: 'large',
                 height: 45,
                 width: 155,
                 margin: 5
             }
         }
     ]
 });

您可以使用
rowViewModel
按记录绑定小部件列:


您可以使用
rowViewModel
按记录绑定小部件列: