colModel: [
{ name: 'Settlement_Method', index: 'Settlement_Method', width: 100, align: "center", edittype:'select',editoptions:{value:getGroupContractNum()},editable: true,},
],
function getGroupContractNum(){
var GroupContractNum = "";
$.ajax({
url: '@Url.Action("ZZ", "Stone_storage")',
datatype: 'json',
type: 'Post',
data: { ID: "" + d + "", num: "1" },
success: function (result) {
if (result.length > 2) {
var arr1 = result.split(",");
var a2 = "";
for (var i = 0; i < arr1.length; i++) {
var a1 = arr1[i];
if (i == 0) {
a2 = a1.slice(5);
}
else {
a2 = a1.slice(4);
}
loadcities1();
}
}
},
error: function (e) {
alert("请求出错处理");
}
});
function loadcities1() {
for (var q = 0; q < cities1.length; q=q+2) {
var city1 = cities1[q];
var city2 = cities1[q + 1];
GroupContractNum += city1 + ":" + city2 + ";";
}
}
return GroupContractNum; //必须有此返回值
}
这样写添加不了下拉框?是什么原因呢?