如何在extjs中使用addCls()3.2 [英] How to use addCls() in extjs 3.2
本文介绍了如何在extjs中使用addCls()3.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
{
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'); //这行抛出错误。
}
if(record.data.Excl ==否){
cohartstore.remove(record);
}
}}
解决方案
在ExtJS中,您不能使用 addCls
,但您可以使用的是 addClass
根据您的代码,您需要索引行
,然后使用
Ext.fly(row [i])。addClass('row-deleted');
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);
}
} }
解决方案
In ExtJS you can not use addCls
but what you can use is addClass
As per your code you need index of row
and then use
Ext.fly(row[i]).addClass('row-deleted');
这篇关于如何在extjs中使用addCls()3.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文