$('#dg_BusinessRuleList').datagrid({
url: 'craft/MCC.ashx?act=getRuleData',
method: "get",
fit: true,
border: false,
rownumbers: true,
singleSelect: true,
pagination: false,
toolbar: "#tb_BusinessRule",
queryParams: {
'MCCPTEntryID': MCCPTEntryID
},
onClickRow: function (index) {
onClickRow_RuleEntry(index);
},
columns: [[
{ field: 'id', hidden:true },
{ field: 'fCode', title: '规则编号', width: 100, align: 'center' },
{ field: 'fName', title: '规则名称', width: 150, align: 'center' },
{
field: 'fValue', title: '值', width: 80, align: 'center',
formatter: function (value, row) {
return row.fDescription;
},
editor: {
type: 'combobox',
options: {
valueField: 'fValue',
textField: 'fDescription',
method: 'get',
//required: true,
editable: false,
url: 'craft/MCC.ashx?act=getRulesEntrySelect&RulesID='+ 我这边就是要取filed:id 的值,请问这个要怎么写啊
}
}
}
]]
});
RulesID:这边要跟着 field:id 的值,请问要怎么写 。好难啊。
3 个解决方案
#1
不需要配置。。动态获取editor后调用combobox的reload方法加载数据
onClickRow: function (index) {
onClickRow_RuleEntry(index);
var ed = $('#dg_BusinessRuleList').datagrid('getEditor', {index:index,field:'fValue'});//获取combobox编辑器
var row=$('#dg_BusinessRuleList').datagrid('getRows')[index];//获取编辑的行的id
$(ed.target).combobox('reload',''craft/MCC.ashx?act=getRulesEntrySelect&RulesID='+row.id)//动态加载传递id值
},
#2
#3
#1
不需要配置。。动态获取editor后调用combobox的reload方法加载数据
onClickRow: function (index) {
onClickRow_RuleEntry(index);
var ed = $('#dg_BusinessRuleList').datagrid('getEditor', {index:index,field:'fValue'});//获取combobox编辑器
var row=$('#dg_BusinessRuleList').datagrid('getRows')[index];//获取编辑的行的id
$(ed.target).combobox('reload',''craft/MCC.ashx?act=getRulesEntrySelect&RulesID='+row.id)//动态加载传递id值
},