Extjs:如何为特定单元格添加/删除类?

egg*_*egg 0 extjs extjs4

免责声明:我对Extjs来说是全新的.

我在ComboBox上有一个select监听器.选择后,我可以设置不同的单元格值:

'select': function (combo, records, Opts) {
    e.record.set('value', 'hello world'); //set text for the "value" cell
    ....
Run Code Online (Sandbox Code Playgroud)

挑战在于我可能需要为该单元格添加或删除一个类.我无法在Sencha Docs中找到如何选择或操作单元格而不是设置值.一种可能性是在列上使用自定义渲染器,但这不能按预期工作(除了文本/值正确设置).想法取自:http://snipplr.com/view/40942/

        ,renderer: function (value, meta, record, rowIndex, colIndex, store) {
            meta.css += ' rw-no-edit';
            return 'hello again';
Run Code Online (Sandbox Code Playgroud)

为记录中的特定列添加和删除类的最佳方法是什么?

dbr*_*rin 5

到目前为止,我见过的最好的网格样式指南来自裙边:

http://skirtlesden.com/articles/styling-extjs-grid-cells

我认为自定义渲染器是你的选择.小心返回实际值而不是'hello world'字符串.