代码之家  ›  专栏  ›  技术社区  ›  Dirk Schumacher

ExtJs 6 checkcolumn侦听器调用的访问记录

  •  0
  • Dirk Schumacher  · 技术社区  · 7 年前

    单击复选框时,我正在尝试访问该行的记录。

    下面是一些代码摘录:

    Ext.define('SomeList', {
    
      extend: 'Ext.grid.Panel',
      mixins: {
        field: 'Ext.form.field.Field'
      },
      xtype: 'myXType',
      requires: [...],
    
      columns: [
        {
            header: 'ID',
            dataIndex: 'id',
            width: 50
        },
        {
            header: 'Checked?',
            xtype: 'checkcolumn',
            dataIndex: 'checked',
            width: 120,
            listeners: {
                checkchange: function( component, rowIndex, checked, eOpts ) {
                    console.log('checkchange', component, rowIndex, checked, eOpts);
                    // how to access the table's column record here?
                },
            },
        }
    ],
    ...
    

    我觉得被屏蔽了,在网上找不到任何相关信息。 我犯了一个共同的基本思想错误吗?

    我使用的是extjs6.0.0classic。

    1 回复  |  直到 7 年前
        1
  •  1
  •   Rohit Sharma    7 年前

    你应该使用 grid.getStore().getAt(rowIndex); checkchange

    Working Fiddle