Angular 9 / TypeScript - Add additional column with icon/call to method

Angular 9 / TypeScript - Add additional column with icon/call to method

RandomUser2RandomUser2 Posts: 3Questions: 2Answers: 0

In the last column of my table I want to display an icon where when clicked launches a popup window.
My table gets it's data from a DB using the ajax call then maps it to an object (here myValues) which then gets bound to the table. Is there a way to intercept this to add what I need?

myValues: any;  // Can it be DataTables.ColumnSettings = {} ?
dtOptions: DataTables.Settings {};
this.myValues = [ {data: 'valueId' }, {data, 'myValue'} ];
this.dtOptions = {
  ...
  ajax: {
     url: this.URL,
     type: 'GET'
  },
  columns: this.myValues,
  columnDefs: [ orderable: true, targets: [_all] }
  ...
};

Thanks,

Answers

This discussion has been closed.