LigerUi中GRID嵌入下拉框(select)示例!

var csj_data;


$.ajax
({
cache: false,
async: false,
type: 'post',
dataType: 'json',
data: { aaa: "1" },
url: "../handle/LaCode.ashx?ajaxaction=Select_FangAn",
success: function (data) {
csj_data = data;
}
});


{ display: "所属方案", name: "Program_Id", width: 120, type: "text", align: "left", validate: { required: true },

editor: { type: 'select', data: csj_data, valueColumnName: 'Program_Id', displayColumnName: 'Program_Name' },


render: function (rowdata) {
for (var i = 0; i < csj_data.length; i++) {
if (csj_data[i]['Program_Id'] == rowdata.Program_Name)
return csj_data[i]['Program_Name']
}
return rowdata.Program_Name;
}

你可能感兴趣的:(select)