We have an array in which we have status names, status_ids and colors. We are using status in status columns right now want to display the colors as a background by using the same array. Screen shot of the array and its data is attatched and also adding the code for the status column only. We want it like that example https://bryntum.com/products/grid/examples/project-summary/ I have tried this but unfortunately the background colors are not picking and showing in the status combo field.
columns : [
{
text : 'Status',
field : 'status_name',
renderer({ value }) {
// row.toggleCls('b-completed', value === 'Complete');
return {
class : 'badge',
style : {
backgroundColor : `var(--${statuses.colour[statuses.status.indexOf(value)]})`
},
text : value
};
},
width : '11em',
editor : { type : 'combo', items : statuses, displayField : 'status', valueField : 'status' },
},
]
Waiting for the reply.
Thank you