I am not too familiar with PropertyGrid or the CollectionEdito r but it
appears that in v1.0 or v1.1 we do call the on methods as long as the index
is valid and OnValidate does not throw.
Let me know if you are still having problems and maybe post a simple repro
for the problem, and the version of the runtime you are using.
Ryan Byington [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
| Content-Class: urn:content-classes:message
| From: "m.pollack" <an*******@disc ussions.microso ft.com>
| Sender: "m.pollack" <an*******@disc ussions.microso ft.com>
| Subject: CollectionBase RemoveAt bug?
| Date: Fri, 9 Jan 2004 19:48:41 -0800
| Lines: 21
| Message-ID: <00************ *************** *@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcPXLKORHVjUpaD CSL+76ScyCS52wQ ==
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.publi c.dotnet.genera l
| Path: cpmsftngxa07.ph x.gbl
| Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:120625
| NNTP-Posting-Host: tk2msftngxa08.p hx.gbl 10.40.1.160
| X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
| Hi all,
|
| I have an application which uses a class object that
| contains a collection. In order to use the PropertyGrid
| control to expose properties to the user at runtime, I
| created a strongly-typed collection class based on
| CollectionBase. However, when I use the PropertyGrid to
| remove objects from the collection at runtime via the
| popup Object Collection Editor, it appears that the "On*"
| (CollectionBase .OnRemove and
| CollectionBase. OnRemoveComplet e) hook methods in the
| collection class aren't being called. The Insert hook
| (CollectionBase .OnInsert) works fine, though. I need to
| get this working, because if the user removes objects from
| the collection I have housekeeping to do. Is this a bug?
| It seems to be -- I saw one reference to the problem here:
|
|
http://lists.ximian.com/archives/public/mono-list/2001-
| November/001978.html
|
| Any thoughts? thanks... MP
|