jQuery MiniUI
标题:
MINIUI中怎么获得一行中combobox的id和text
[打印本页]
作者:
zhou259358
时间:
2015-11-12 16:37:36
标题:
MINIUI中怎么获得一行中combobox的id和text
后台js的 columns: [ { type: "checkcolumn", width: "30px" },
{ header: "客户平台问题号", field: "PlatformID", width: "100px", align: "center", headerAlign: "center", editor: { type: "textbox", width: "100%"} },
{ header: "月份", field: "MontInfo", width: "100px", align: "center", headerAlign: "center", dateFormat: "yyyy-MM-dd", editor: { type: "datepicker", width: "100%"} },
{ header: "系统名称", field: "SysName", width: "80px", align: "center", headerAlign: "center", editor: { type: "combobox", id: "SysName", showNullItem: "true", onbeforeshowpopup: SetSysNameData, width: "100%"} },
{ header: "项目经理", field: "ProjectManager", width: "80px", align: "center", headerAlign: "center", editor: { type: "combobox", id: "ProjectManager", onbeforeshowpopup: SetProjectManagerData, showNullItem: "true", width: "100%"} },
{ header: "开始开发时间", field: "BeginDate", width: "100px", align: "center", headerAlign: "center", dateFormat: "yyyy-MM-dd", editor: { type: "datepicker", width: "100%"} },
{ header: "提交发布时间", field: "SubDate", width: "100px", align: "center", headerAlign: "center", dateFormat: "yyyy-MM-dd", editor: { type: "datepicker", width: "100%"} },
{ header: "开发工作量", field: "WorkDay", width: "80px", align: "center", headerAlign: "center", editor: { type: "spinner",maxValue:"100000", width: "100%"} },
{ header: "应发金额", field: "SumMoney", width: "80px", align: "center", headerAlign: "center", editor: { type: "textbox", width: "100%"} },
{ header: "评估工作量", field: "EvaluationDay", width: "80px", align: "center", headerAlign: "center", editor: { type: "spinner", maxValue: "100000", width: "100%"} },
{ header: "延迟工作量", field: "DelayDay", width: "80px", align: "center", headerAlign: "center", editor: { type: "spinner", maxValue: "100000", width: "100%"} },
{ header: "备注", field: "Remark", width: "250px", align: "center", headerAlign: "center", editor: { type: "textbox", width: "100%"} }
]
//js保存子表数据
function saveData(e) {
Grid2.commitEdit();
var data = Grid2.getData();
var recordId = Grid.getSelected().RecordID;
Grid2.loading("保存中,请稍后......");
$.each(data, function (i, item) {
var submitData = mini.encode(item);
$.ajax({
url: "/AjaxMethod/Default.ashx",
data: { Method: "SaveReportDetailData", submitData: submitData, RecordID: recordId },//还需要传递"系统名称"的文本,默认的方法只能传递一个id数据
type: "post",
error: function () {
alert("cuowu");
}
});
});
Grid2.reload();
$("#edit").css("display", "inline");
$("#cancelEdit").css("display", "none");
}[attach]6803[/attach]
作者:
dforce
时间:
2015-11-12 16:46:27
有combobox编辑器的列的话,需要设置displayField
编辑完成后,会将combobox选中的值到field对应字段,文本更新到displayField对应的字段
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2