这是我的第一个 Angular 项目。我正在将JqGrid集成到ngx-admin模板。我想将 Angular 组件附加到 JqGrid 列/单元格(editAction)。我将组件作为字符串与数据一起传递。但是,该列似乎是空白的。
这甚至可能吗?任何帮助将非常感激!
var compTypeJQGridDefaults = {
colNames: ['Company Type Name', '', '',],
colModel: [
{
name: 'companyTypeName', index: 'companyTypeName', search: false, width: 100, searchoptions: {
sopt: jqGridSearchOperationsFor.String
},
searchrules: jqGridSearchRulesFor.DefaultMandatory
},
{ name: 'editAction', sortable: false, classes: 'edit', width: 37, search: false, fixed: true,
formatter: function (cellValue){
return cellValue; // "<nb-actions size=\"small\"><nb-action icon=\"save-outline\" (click)=\"onEdit\" nbTooltip=\"Click to update a 'Company Type'.'\" nbTooltipPlacement=\"right\"></nb-action> </nb-actions>"
}
},
{ name: 'deleteAction', sortable: false, classes: 'delete', width: 37, search: false, fixed: true },
],
autoencode: false,
autowidth: true,
shrinkToFit: true,
pager: '#compTypeGridPager',
rowNum: paramFromView.PageSize,
sortname: paramFromView.SortName,
sortorder: paramFromView.SortOrder,
loadBeforeSend: function(jqXHR) {
jqXHR.setRequestHeader("authorization", 'Bearer ' + authToken);
},
url: paramFromView.Url
};