How to use addCls() in extjs 3.2

北慕城南 提交于 2019-12-11 05:18:50

问题


I am try to delete row from a grid. For that I need to strike a row. I am using addCls but it is not supporting in extjs 3. What is the alternate way to do that.

{ 
xtype: 'button', 
text: 'Delete',
handler : function(){
    var cogrid = Ext.getCmp('HART_GRID');
    var costore = cohartgrid.getStore();
    var record = Ext.getCmp('HART_GRID').getSelectionModel().getSelected();
    if (record) {
        Ext.fly(row).addCls('row-deleted');// This line is throwing error.
    }
    if(record.data.Excl == "No"){
        cohartstore.remove(record);
    }
} }

回答1:


In ExtJS you can not use addCls but what you can use is addClass

As per your code you need index of rowand then use

Ext.fly(row[i]).addClass('row-deleted');



来源:https://stackoverflow.com/questions/38156553/how-to-use-addcls-in-extjs-3-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!