jQuery MiniUI

 找回密码
 立即注册
查看: 2652|回复: 1
打印 上一主题 下一主题

MINIUI中怎么获得一行中combobox的id和text [复制链接]

Rank: 2

跳转到指定楼层
楼主
发表于 2015-11-12 16:37:36 |只看该作者 |倒序浏览
后台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");
}


附件: 你需要登录才可以下载或查看附件。没有帐号?立即注册

Rank: 8Rank: 8

沙发
发表于 2015-11-12 16:46:27 |只看该作者
有combobox编辑器的列的话,需要设置displayField
编辑完成后,会将combobox选中的值到field对应字段,文本更新到displayField对应的字段

Archiver|普加软件

GMT+8, 2024-6-16 15:16 , Processed in 1.040291 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部