Hi,
I've got troubles with event messaging between 2 classes.
In a WinForm, a DataGrid has a ComboBox. I need to use the SelectedIndexChanged of the cbo to perform some DB updates.
ComboBox is done by a component that exposes 2 classes: DataGridComboBox that inherits from ComboBox and
DataGridComboBoxColumnStyle that inherits from DataGridColumnStyle.
In DataGridComboBox I declared an event: Public Event ppSelectedIndexChanged()
This event is raised by DataGridComboBox_ SelectedIndexChanged
In the client code(the WinForm code) an instance of DataGridComboBox is declared WithEvents: Private WithEvents oDataGridComboBox As DataGridComboBox
At this time, if I select the object DataGridComboBox, I can see the event ppSelectedIndexChanged in the list.
Then I write a sub to handle the event:
Public Sub oDataGridComboBox_ppSelectedIndexChanged() Handles oDataGridComboBox.ppSelectedIndexChanged
When the code run, the SelectedIndexChanged event is fired and fires ppSelectedIndexChanged, but the
oDataGridComboBox_ppSelectedIndexChanged event handler is not executed.
I also tried to use the AddHandler, AddressOf mechanism, but with few success either!
Can someone help be solve this trick?
TIA,
Philippe