Posted 3 June 2021, 3:49 am EST
how to programmatically invoke a combbox event from the invoke of another combobox event
Forums Home / Spread / Spread for WinForms
Posted by: amulya.verma on 3 June 2021, 3:49 am EST
Posted 3 June 2021, 3:49 am EST
how to programmatically invoke a combbox event from the invoke of another combobox event
Posted 7 June 2021, 6:36 am EST
Hi,
Can you please explain what is your use-case, so we can suggest an approach?
By invoke a event, do you mean that you want to do something after a ComboBox drops?
Also, just to confirm, you are using ComboBoxCellType for this?
Thanks,
Jitender
Posted 7 June 2021, 7:12 am EST - Updated 30 September 2022, 1:19 pm EST
Hi,
My goal is “SpreadContainer_ComboCloseUp event of combbox1 should invoke or fire the ComboCloseUp event of combbox2 automatically”. see attached picture.
Yes I confirm that I am using ComboBoxCellType .
Posted 7 June 2021, 9:39 am EST
The ComboCloseUp event is raised internally when dropdown is closed.
You would need to create your own custom FpSpread class which invokes the protected OnComboCloseUp method. You can add a public method that calls this protected method.
Alternatively, you can also use reflection to invoke this method.
Please check the attached sample which demonstrates this.
ComboBoxEvents.zip
Regards,
Jitender
Posted 8 June 2021, 11:45 am EST
Thanks for the support, yes it is working.
One additional question can I invoke ComboSelChange event similar to OnComboCloseUp
Posted 9 June 2021, 4:03 am EST
Yes, you can do the same for ComboSelChange (corresponding method is OnComboSelChange).
Regards,
Jitender