常遇到的问题:
1)得到选择项,一般涉及到选择GridPanel中的某一行数据,然后进行一些操作:删除、修改等:
var sel = voucherPDF_List.getSelectionModel().getSelection();
2)得到选择项的列,一般涉及到对选择GridPanel中某一行的数据的某一列,取出该数据进行判断或者修改操作:
// 校验数据 var count=voucher_type_grid.getStore().getCount(); //取出该PGridPanel中有多少行数据 for(var i=0;i<count;i++){
//将一些数据和指定行的指定列名的数据 if(Ext.getCmp('vtName').getValue()==<strong><span style="color:#990000;">voucher_type_grid.getStore().getAt(i).get("vt_name")){</span></strong> //处理业务逻辑的代码 Ext.Msg.alert("系统提示", "凭证类型不能重复,请选择其它凭证类型!"); return; } }