jqGrid编辑行时下拉框问题?

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;        //必须有此返回值
}



    这样写添加不了下拉框?是什么原因呢?
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问