gpt4 book ai didi

javascript - jqgrid图标的onclick下拉列表

转载 作者:行者123 更新时间:2023-12-03 10:31:08 25 4
gpt4 key购买 nike

我试图在 jqgrid 的一个单元格中显示下拉列表,并单击铅笔图标(单击时整行变为可编辑,并且下拉列表显示在借方贷方中)下图显示了我尝试做的事情

我的方法低于我所做的代码 enter image description here

''''''''''''''''''''''''gridfucntion''''''''''''''''''''''''''''''''''''''''

function showMinorityEntryData(){
alert('minoritydatashow');
if($("#reportingPeriodId").val()!="" && $("#parentCmp").val()!=""){
alert('minoritydatashow1111');
// $('#masterDiv').show();
$("#grid").jqGrid({
datatype: 'json',
url:'showMinorityData.action?companyId='+companyId+"&parentCmp="+$("#parentCmp").val()+"&reportingPeriodId="+$("#reportingPeriodId").val(),
mtype: 'GET',
colNames:['Id', 'GlELEMENTNAME', 'Account Type','Pre-Acq-Amount','Share Amount','Actions'],
colModel:[
{name:'id',index:'id', width:55,editable:false,editoptions:{readonly:true,size:10},hidden:false,jsonmap:"minorityId"},
{name:'glElementName',index:'glElementName', width:100,editable:false, editrules:{required:true}, editoptions:{size:10},jsonmap:"glElementName"},
{name:'accountType',index:'accountType', width:100,editable:true, editrules:{required:true}, edittype:"select",formatter:'select',editoptions:{ value: "Debit:Debit;Credit:Credit"},editoptions:{size:10},jsonmap:"acntTypeName"},
{name:'preAcqAmount',index:'preAcqAmount', width:100,editable:true, editrules:{required:true}, editoptions:{size:10},jsonmap:"preAcqAmt"},
{name:'shareAmount',index:'shareAmount', width:100,editable:true, editrules:{required:true}, editoptions:{size:10},jsonmap:"shareAmt"},
{name:'actions',index:'actions', sortable:false,width : 50,align : 'center',formatter:actionIcons}
],

postData: {
},
rowNum:20,
rowList:[10,20,40],
height: 200,
autowidth: true,
// rownumbers: true,
pager: '#pager',
sortname: 'minorityId',
viewrecords: true,
sortorder: "asc",
caption:"Minority Interest",
emptyrecords: "Empty records",
loadonce: false,
loadComplete: function() {
},
jsonReader : {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
cell: "cell",
id: "minorityId"
},
editurl: 'clientArray',
});
}
}

我从此链接获取帮助http://www.codeproject.com/Articles/610359/JqGrid-Inline-Editing

但是当我在下拉列表中转换 accountType 单元格时,它不会显示帐户类型的类型,下图显示了发生的情况 enter image description here

当我单击铅笔图标时,整行变得可编辑,但在 accountype 列中,下拉列表不显示任何值

enter image description here

我做错了什么。jqgrid 对我来说是新的

提前致谢

最佳答案

您应该仅包含editoptions或任何其他属性一次。所以

editoptions:{ value:  "Debit:Debit;Credit:Credit"},editoptions:{size:10}

需要更换为

editoptions: { value: "Debit:Debit;Credit:Credit", size:10}

关于javascript - jqgrid图标的onclick下拉列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29210160/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com