[英]How to pass column value to another column in Jqgrid
I have the following jqgrid code, I am creating a link and then trying to pass the bankId values to each row. 我有以下jqgrid代码,我正在创建一个链接,然后尝试将bankId值传递给每一行。 ie link1 link2
即link1 link2
How can I pass the bankId values in fdic column in jqgrid 如何在jqgrid的fdic列中传递bankId值
{ name: 'bankId',label: 'bankId', align:'left', width: 10,hidden:true },
{ name: 'fdicNumber', label: 'fdicNumber',width: 70, key: true,
formatter: "showlink",
formatoptions: {
baseLinkUrl: testUrl,
idName: "",
addParam: function (options,rowObject) {
// return "clientid="+options.rowid+" ;
return "clientid="+options.bankId+" ;
}
}
},
If you use free jqGrid then the usage of addParam
as function is allowed. 如果使用免费的
addParam
,则允许使用addParam
作为函数。 The callback function has one parameter with properties cellValue
, rowid
, rowData
and options
(with formatoptions
). 回调函数有一个参数,其属性为
cellValue
, rowid
, rowData
和options
(带有formatoptions
)。 You can fix your code of addParam
as following: 您可以按以下方式修复
addParam
的代码:
addParam: function (options) {
return "clientid=" + options.rowData.bankId;
}
or 要么
addParam: function (options) {
return "clientid=" + encodeURIComponent(options.rowData.bankId);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.