Advanced PropertyGrid/CollectionEditor Question

  • Thread starter Thread starter Joerg Krause
  • Start date Start date
J

Joerg Krause

I'm using the PropertyGrid with classes which contain collections. The
collection are shown in the grid appear with the value "(Collection)"
and an ellipses where the user can start the CollectionEditor.

To localize my grid I've add a PropertyTab and a custom
PropertyDescriptor. This works well for all properties - except
collection. If I switch to my own PropertyDescriptor all property get
there values (Category, Description) from the Descriptor class, except
the Collections.
Problem: The Collection entry appears grayed out (like readonly ones)
and cannot be changed anymore. If I switch back from my own Descriptor
to the built in the collection becomes visible.

If I don't use the EditorAttribute with CollectionEditor I get the
standard collection editor, which works, but without any access to my
descriptor, because I don't have the button in the PropertyTab in the
grid of the CollectionEditor (in my own editor I have such a button
because I have turned on the Toolbar via Reflection).

Has anybody any ideas how to deal with PropertyDescriptor AND
CollectionEditor?

Thanks for any help...

Joerg
 
Hi Joerg,
I'm investigating your problem, however, I still have something unclear on
this problem.
let's name the class which contain collections as MyClass,
the collection type in MyClass as MyCollection.
From your post, It seems you defined a PropertyTab class for MyClass,
however, I'm not clear about what's the custom PropertyDescriptor defined
for? And I'm also not clear about what property does the EditorAttribute
defined on? You also said you turned on the toolbar via reflection, are you
showing MyClass in propertygrid in the user-defined collection editor or
just in the propertygrid?

Sorry for so many questions,
if you have any updates on this problem ,please let me know!
Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| From: (e-mail address removed) (Joerg Krause)
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Subject: Advanced PropertyGrid/CollectionEditor Question
| Date: 20 Oct 2003 07:24:21 -0700
| Organization: http://groups.google.com
| Lines: 25
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 212.202.35.103
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1066659861 5051 127.0.0.1 (20 Oct 2003
14:24:21 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Mon, 20 Oct 2003 14:24:21 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
m!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54825
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I'm using the PropertyGrid with classes which contain collections. The
| collection are shown in the grid appear with the value "(Collection)"
| and an ellipses where the user can start the CollectionEditor.
|
| To localize my grid I've add a PropertyTab and a custom
| PropertyDescriptor. This works well for all properties - except
| collection. If I switch to my own PropertyDescriptor all property get
| there values (Category, Description) from the Descriptor class, except
| the Collections.
| Problem: The Collection entry appears grayed out (like readonly ones)
| and cannot be changed anymore. If I switch back from my own Descriptor
| to the built in the collection becomes visible.
|
| If I don't use the EditorAttribute with CollectionEditor I get the
| standard collection editor, which works, but without any access to my
| descriptor, because I don't have the button in the PropertyTab in the
| grid of the CollectionEditor (in my own editor I have such a button
| because I have turned on the Toolbar via Reflection).
|
| Has anybody any ideas how to deal with PropertyDescriptor AND
| CollectionEditor?
|
| Thanks for any help...
|
| Joerg
|
 
Back
Top