Guest User

Untitled

a guest
Nov 15th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. var columnDefs = [
  2. {headerName: "Workload", field: "workload"},
  3. {headerName: "units", "field": "units"}
  4. ];
  5.  
  6. $scope.gridOptionsObject = {
  7. columnDefs: columnDefs,
  8. rowData: $scope.rowData,
  9. headerCellRenderer: (params) =>
  10. {return headerCellRendererFunc(params)}
  11. };
  12.  
  13. var headerCellRendererFunc = function(params) {
  14. var headerColDef = params.colDef;
  15. headerColDef.name = headerColDef.headerName;
  16. headerColDef.isMetadata = false;
  17. return '<h1 column="headerColDef"></h1>';
  18. }
  19.  
  20. var header_template = '<span class="text-danger" style="height:30px;">Some Value </span>';
  21.  
  22. columnDefs = [];
  23. customColumn = {headerName: header_template, field: name};
  24. columnDefs.push(customColumn);
  25.  
  26. return '<h1 column="headerColDef">' + headerColDef.name + '</h1>';
  27.  
  28. headerCellTemplate = function () {
  29. var eCell = document.createElement('span');
  30. eCell.innerHTML = '<div></div>'
  31. return eCell;
  32. };
Add Comment
Please, Sign In to add comment