var productGridColumn=new Ext.grid.ColumnModel([
{
id :'price'
,dataIndex :'price'
,header :'price'
,width :80
,sortable :true
,align :'right'
,editor :new Eheres.core.component.priceField({
allowBlank :false
,minValue :0
,maxValue :9999999
,listeners :{
blur:function(text){
//如何在这个事件里面获取某一行的数据
}
}
})
}
]);
blur:function(text){
var r=this.ownerCt.grid.getSelectionModel().getSelections();
//这个this是有作用域的 在这个事件里不好用
}
第1个回答 2016-04-25
选中某一行,var record = grid.getSelectionModel().getSelection(); 一行的所有数据都在record里面 具体某一列:record.get("列名-dataIndex")追问
这个我也知道 不好用