循环获取datagrid多选项的指定列的值
var selections = grid.getSelections();
var voucherids = "";
for(var i=0; i<selections.length; i++){
var vids = selections[i].VOUCHER_ID;
voucherids = vids+","+voucherids;
var row = $('#gridlist').datagrid('getRowIndex', vids);
if ($('#gridlist').datagrid('validateRow', row)){
$('#gridlist').datagrid('endEdit', row);
editIndex = undefined;
}
var voucherids = "";
for(var i=0; i<selections.length; i++){
var vids = selections[i].VOUCHER_ID;
voucherids = vids+","+voucherids;
var row = $('#gridlist').datagrid('getRowIndex', vids);
if ($('#gridlist').datagrid('validateRow', row)){
$('#gridlist').datagrid('endEdit', row);
editIndex = undefined;
}
}
var param = {};
param.voucher_id = voucherids;
voucherids即是结果值。