Posted 21 December 2022, 11:18 pm EST
Hi Kingman,
You can create a custom subeditor by creating a form that implements the ISubEditor interface. The instance of the custom SubEditor can then be set to the SubEditor property of the CellType. Please see the following code for the same:
GeneralCellType generalCellType = new GeneralCellType();
fpSpread1.Sheets[0].Cells[1, 1].CellType = generalCellType;
generalCellType.SubEditor = new CustomCellEditor();
generalCellType.DropDownButton = true;
fpSpread1.SubEditorClosed += (editorSender, editorEventArgs) =>
{
(editorSender as FpSpread).ActiveSheet.Cells[editorEventArgs.Row, editorEventArgs.Column].Value = (editorEventArgs.SubEditor as CustomCellEditor).GetValue();
};
Kindly refer to the attached sample for full implementation. (See CustomCellSubEditor_Mod.zip)
Thanks & Regards,
Aastha