I have my Collection class inherited from CollectionBase. Now, by default the VS.Net IDE will provide a Collection Editor for any properties of type of my Collection.
I am adding components of type MyComponent(inherited from Component) to the collection.
I have overriden the Dispose method of Component in MyComponent class. When the user clicks the Remove button in the collectionEditor and then Ok, the Dispose method is called.
Now i want that when a component is removed the user should be prompted for confirmation via a MessageBox.Show, and only if he clicks OK in the MessageBox should the component be removed. I know i can examine the DialogResult property of the MessageBox.Show() method, but what code should be written when Cancel is clicked so
that the component remains in the collection.
Thanks in advance