How to append Angular component to JqGrid's cell?

試著忘記壹切 提交于 2020-02-23 04:01:50

问题


This is my first Angular project. I'm integrating JqGrid to ngx-admin template. I would like to append an Angular component to a JqGrid column/cell (editAction). I'm passing the component as a string along with data. However, the column appears to be blank.

Is this even possible? Any help would be much appreciated!

      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
  };

来源:https://stackoverflow.com/questions/59865736/how-to-append-angular-component-to-jqgrids-cell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!