editor options 값을 ajax 결과값으로 선언했을때 no options 뜹니다.


(미다스머니) #1

소스입니다.
var keyTestList1 = [];

{key: “PBAN_CLSF_BIG_CODE”, label: “공시대분류명”, width: “15%”, sortable: true, align: “left”,
formatter: function () {

				var retStr = this.value;
        		for(var i=0, len=keyTestList.length; i<len; i++){
        			if(keyTestList[i]["value"] == this.value){
        				retStr = keyTestList[i]["label"];
        				break;
        			}
        		}
        		return retStr;
        	}, editor: {
        		type: "select", config: {
                    columnKeys: {
                        optionValue: "value", optionText: "label"
                    },
                    options: keyTestList1
                }
        	}	
		},

$("#PBAN_MMNT_CODE").change(function(){
$.ajax({
url: _contextPath + “/manager/idck/selectTcbPbanIemListForPbanClsfBigNm.do”,
type: ‘post’,
dataType: ‘json’,
data: {
“PBAN_YR”: $("#PBAN_YR").val()
,“PBAN_MMNT_CODE”: $("#PBAN_MMNT_CODE").val()
},
success:function(data){
if(data.success) {

		    	for(i = 0; i <data.result.length; i++){
		    		keyTestList1.push({value: data.result[i]["PBAN_CLSF_BIG_CODE"], label:  data.result[i]["PBAN_CLSF_BIG_NM"]});
		    	} 
		    	
		    	fnGrContent();
	    	} else {
	    		alert(data.message);
	    	}
	    },
		error : function(jqXHR, textStatus, errorThrown){
			alert(textStatus);
		}
	});
});

결과는 select 박스에 no options 뜹니다. 혹시 제가 잘못된부분있나요??