Posted 18 October 2019, 4:21 am EST
Hi,
For custom cell type, you need to override the getHitInfo method and set the isReservedLocation property of the returned hitInfo to handle click events. Please refer to the following code snippet and the sample which demonstrates the same:
getHitInfo(x, y, cellStyle, cellRect, context) {
let info = {
x: x,
y: y,
row: context.row,
col: context.col,
cellRect: cellRect,
sheetArea: context.sheetArea,
sheet: context.sheet,
isReservedLocation: false // return true to prevent stop spread from performing default operation i.e selecting the column
};
if (cellRect.x + cellRect.width - this.size - 10 < x) {
info.isReservedLocation = true;
}
return info;
}
https://stackblitz.com/edit/angular-mwn2xf?file=src/app/app.component.ts
The above sample just demonstrates the functionality by adding a select element on the header and not an actual combobox control. You could add any combobox of your choice.
Please let us know if you would like us to prepare a sample for you by creating and attaching a basic combo box control but for that, we would need some time.
Regards
Sharad