We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CollectionBase question

Thread ID:




5504 Jul 7,2003 02:19 AM UTC WinForms 0
Tags: FAQ
Vikas Manghani
Asked On July 7, 2003 02:19 AM UTC

Hi 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 Best Regards Vikas


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon