Hi,
When I am. trying to edit a cell which has array of values, then on edit, I am getting the following view :
This is the actual view :
This column is reading the data from an object : drivers: any[];
I tried displayValueRenderer function, but it only works, when data from backend populates the store data.
This is my column definition :
{
text: 'Driver(s)',
field: 'drivers',
resizable: false,
flex: 1,
sortable: false,
draggable: false,
renderer: ({ value }) => {
return value && value.length > 0 ? value.map(data => data.driverName).join(', ') : '';
},
editor: {
type: 'combo',
// specify valueField'/'displayField' to match the data format in the employeeStore store
valueField: 'DriverId',
displayField: 'DriverCode',
store: this.employeeStore
},
tooltipRenderer: false,
enableCellContextMenu: false
}
And I am populating store data like this :
public onSchedulerEvents(event: any): Promise<void> {
case 'startcelledit':
const { record, editor, column } = event.editorContext;
if (column.field === 'drivers') {
//load driver
this.driverService.searchDrivers().subscribe((response: [DriverDetails]) => {
editor.inputField.store.data = response;
});
}
break;
}