PropertyGrid String List TypeConverter/Desciptor

G

Guest

Hi,

I would like to create a workable ExpandableObjectConverter for a String
Collection (class inheriting from CollectionBase for example and only
accepting/returning Strings via Add/Remove/Item/DefaultProprty) and a fitting
Descriptor (implementing ICustomTypeDescriptor)... now i created it and it
somewhat works.. my big problem is that i the String classs does not have a
default constructor and so the "Add" item in the collection pop up does not
work.

So i created a simple class with just a single string based data field and
coresponding property... created a typeconverter for it and it worked
somewhat... the problem is my TypeConverter's ConvertFrom method converts the
string into my StringItem class instance which it then returns... but the
Collection Item is never replaced/updated... so the Collection/List value
never changes...

How do i make it work?

In total i would like to have a Path List Object (using a FolderName
EditorAttribute) that i can simpley add to a property grid where i see all
the paths and can change each path directly (typing in the list) or via "..."
select button.

How is something like this possible?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top