如何在Extjs中获取渲染器函数中其他列的值?

Min*_* Ji 5 extjs extjs4 extjs4.1

我想在一列的渲染器函数中获取同一行中另一列的值.我尝试了一种方法,但它没有用.这是我的代码:

columns: [
            {id:'id',header: 'ID', width: 30, sortable: true, dataIndex: 'category_id'},

            {header: 'current_level', width: 100, sortable: true, dataIndex: 'current_level'},
            {header: 'complete_code', width: 100, sortable: true, dataIndex: 'complete_code'},
            {header: 'parent_id', width: 100, sortable: true, dataIndex: 'parent_id'},
            {header: 'parent_name', width: 100, sortable: true, dataIndex: 'parent_name'},
            {
                header: 'has_standards', width: 100, sortable: true, dataIndex: 'has_standards',
                renderer: function(val, meta, record, rowIndex) {
                    if (val == 'Yes') {
                        console.log(record.data.category_id);
                    }
                }
            }
        ],
Run Code Online (Sandbox Code Playgroud)

如您所见,我想在has_standards列的渲染器函数中将category_id放在同一行中.但我的方式是错的.你能告诉我怎么做吗?

SW4*_*SW4 12

你想使用record.get('category_id')例如:

           renderer: function(val, meta, record, rowIndex) {
                if (val === 'Yes') {
                    console.log(record.get('category_id'));
                }else{
                    console.log('Value is not "Yes"');
                }
            }
Run Code Online (Sandbox Code Playgroud)