Jqgride关于列表编辑


//检测参数     关于列表编辑弹出页问题
function jccselem(value, options) {
var rowid = options.rowId;
var html = '

';
html = html + '
';
var a = $(html);
var btn = $('');
var me = this;
btn.on('click',function(){
UI.Window.ShowDialog("储存位置选择","pages/GZGL/Jccsxz.jsp?ID="+rowid,'95%','520px',true,'确定', true,
function(data){
data=data+"";
YpdjRunserver.getYpxxByid(data,function(rdata){
$("#v_JCCS"+rowid).val(rdata.WZMC);
grid.setCellValue(rowid,"JCXM",rdata.JCXM);   //给列表字段赋值
grid.setCellValue(rowid,"XMFZR",rdata.XMFZR);   //给列表字段赋值
});
}
);
});
a.append(btn);
if (value) {
a.find('input').val(value);
}
return a.get(0);
}
function jccsvalue(elem, operation, value) {
if (operation === 'get') {
return $(elem).find('input').val() || '';
} else if (operation === 'set') {
$('input', elem).val(value);
}
}

列表字段

{
label:'检测参数',
name: 'JCCS',
index: 'JCCS',
width: 300,
align: "left",
sorttype: "String",
editable : true,
edittype:'custom',
editoptions: {custom_element:jccselem,
custom_value:jccsvalue}
},

相关