I have a list of users and each user has several roles as array. I use ag-grid to display all users along with their roles, but it looks like ag-grid does not work with my data structure. So what is the best way that I can display all user roles for each user on grid table?
data structure:
[
{
userId: ''
username: '',
userRoles: [
{roleId: '', roleName: ''},
...
]
},
...
]
ColDef.valueGetterproperty to set the column value to a comma-delimited string containing the values:const colDef: ColDef = this.grid.columnApi.getColumn('skillLevels').getColDef(); colDef.valueGetter = this.getSkillLevels;(wherethis.getSkillLevelsreturns a string containing the comma-delimited values).