2021年4月27日星期二

ag grid edit color of each row depends on its key

i using ag grid, i have tasks to diplay each task has a status (DONE,RELEASED,ACCEPTED ...) and i want to show in grid. each row display a task and i want to appear in such color that i defind in js file

      $scope.status=      [      {'status:DONE','color:red'}, ...      ]    

and so on.

the data about task i read it from db so in gridOptions the rowdata is null

```  $scope.gridOptions = {              columnDefs: columnDefs,              rowData: null,              angularCompileRows: true,              floatingFilter: true,              rowSelection: 'single',              animateRows: true  };  ```  

in other function i get data from database and i write

`$scope$scope.gridOptions.api.setRowData($scope.tasksList);`  

my question how can i set for each status to diplay it in a predefined color after setrowdata ?

https://stackoverflow.com/questions/67283183/ag-grid-edit-color-of-each-row-depends-on-its-key April 27, 2021 at 08:36PM

没有评论:

发表评论