M
moondaddy
I have a combo which I want to have a custom event do something with the
selected item in the combo (This could replace the SelectedIndexChanged
event).
1) The combo's key up event calls a public method in a module which does
some things such as do an autocomplete for the combo.
2) If a certain condition in this public method is met, I want to fire a
custom event back in the form where the combo is located. This event would
then call code unique to this form and combo such as writing the combo's
value to the db or something.
How can I call an event in a form (possibly attached to the combo control)
from a method in a module? Would I attach the event to the combo using
"AddHandler" and then pass a reverence to the combo into this public method
and then from with in this method do something like: "call
myCombo.myCustomEvent" the certain condition is met.
I need this to be generic and not reference the form or combo specifically
by hard coding their names because this is a generic method that is used by
any combo in any form.
Any good ideas?
selected item in the combo (This could replace the SelectedIndexChanged
event).
1) The combo's key up event calls a public method in a module which does
some things such as do an autocomplete for the combo.
2) If a certain condition in this public method is met, I want to fire a
custom event back in the form where the combo is located. This event would
then call code unique to this form and combo such as writing the combo's
value to the db or something.
How can I call an event in a form (possibly attached to the combo control)
from a method in a module? Would I attach the event to the combo using
"AddHandler" and then pass a reverence to the combo into this public method
and then from with in this method do something like: "call
myCombo.myCustomEvent" the certain condition is met.
I need this to be generic and not reference the form or combo specifically
by hard coding their names because this is a generic method that is used by
any combo in any form.
Any good ideas?