469,957 Members | 2,710 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,957 developers. It's quick & easy.

Problem with event messaging between 2 classes

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
Nov 20 '05 #1
0 763

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Pete Loveall | last post: by
5 posts views Thread by Robbert van Geldrop | last post: by
2 posts views Thread by Budhi Saputra Prasetya | last post: by
reply views Thread by Budhi Saputra Prasetya | last post: by
4 posts views Thread by Mark | last post: by
reply views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.