对于ColModel的最后一个值,只显示最后一个NAME:是否有办法显示所有NAME:?感谢您的帮助。感谢
colModel: [
{
name: 'PRIORITY_CD', index: 'PRIORITY_CD', width: 200, editable: true, sortable: true,
},
{
name: 'CODE_COMBI', index: 'CODE_COMBI', width: 200, editable: true, sortable: true
},
{
name: 'ACTION', index: 'PRIORITY_CD', width: 200, editable: true, sortable: true, formatter: detailsLink,
name: 'ACTION', index: 'PRIORITY_CD', width: 200, editable: true, sortable: true, formatter: editLink,
name: 'ACTION', index: 'PRIORITY_CD', width: 200, editable: true, sortable: true, formatter: deleteLink
},
]
function detailsLink(cellValue, options, rowdata, action) {
return "<a href=''../../C3Web/CriteriaCombinationMapping/GetCritCombiMap'" + rowdata.PRIORITY_CD + " > Details</a>";
function editLink(cellValue, options, rowdata, action) {
return "<a href=''../../C3Web/CriteriaCombinationMapping/GetCritCombiMap'" + rowdata.PRIORITY_CD + " > Edit</a>";
function deleteLink(cellValue, options, rowdata, action) {
return "<a href=''../../C3Web/CriteriaCombinationMapping/GetCritCombiMap'" + rowdata.PRIORITY_CD + " > Delete</a>";
}
答案 0 :(得分:0)
您定义colModel的方式不正确。要做你想做的事,你可以在colModel中有一个字段,一个格式化程序有三个这样的链接:
colModel: [
{
name: 'PRIORITY_CD', index: 'PRIORITY_CD', width: 200, editable: true, sortable: true,
},{
name: 'CODE_COMBI', index: 'CODE_COMBI', width: 200, editable: true, sortable: true
},{
name: 'ACTION', index: 'PRIORITY_CD', width: 200, editable: true, sortable: true, formatter: vieweditdel
}
]
function vieweditdel(cellValue, options, rowdata, action) {
var detail = "<a href=''../../C3Web/CriteriaCombinationMapping/GetCritCombiMap'" + rowdata.PRIORITY_CD + " > Details</a>";
var edit = "<a href=''../../C3Web/CriteriaCombinationMapping/GetCritCombiMap'" + rowdata.PRIORITY_CD + " > Edit</a>";
var delete = "<a href=''../../C3Web/CriteriaCombinationMapping/GetCritCombiMap'" + rowdata.PRIORITY_CD + " > Delete</a>";
return detail+edit+delete;
}