var ids = "";
var rows = brUnitRuleGrid.getSelectionModel().getSelection();
if(rows.length==0){
BusinessCommon.showMessageBox({type:'info',msg:'没有选择要删除的条数'});
return;
}
for(var i = 0 ;i<rows.length;i++){
ids+=rows[i].get("id")+",";
var rows = brUnitRuleGrid.getSelectionModel().getSelection();
if(rows.length==0){
BusinessCommon.showMessageBox({type:'info',msg:'没有选择要删除的条数'});
return;
}
for(var i = 0 ;i<rows.length;i++){
ids+=rows[i].get("id")+",";
}
多选框插件
var smRule = Ext.create('Ext.selection.CheckboxModel',{listeners: {
selectionchange: function(sm, selections) {
// alert("选择了");
var rows = brUnitRuleGrid.getSelectionModel().getSelection();
if(rows.length<=0){
ruleId = "";
//移除加载影响分析
brUnitRuleEffectGridStore.removeAll();
//移除交易步骤
brUnitFunctionStepruleStore.removeAll();
//移除影响范围
brUnitRuleEffectscopeGridStore.removeAll();
return;
}
}
}}
);
在grid中可以配置
selModel: smRule,