Hi all,
I'm using a class derived from ExpandableObjectConverter in order to
facilitate custom sorting of displayed properties on a PropertyGrid.
Essentially, it's the same class as PropertySorter, defined here:
http://www.codeproject.com/KB/cs/orderedpropertygrid.aspx
It all works for me as advertised, except for one small hitch. The
PropertySorter class (derived from ExpandableObjectConverter) is
defined in a DLL assembly (basically a bunch of my own common utility
classes), which is referenced by my main C# Forms application. Both
projects are being built in the same solution. For some reason, when I
use the PropertySorter on one of my class declarations, such as,
[TypeConverter(typeof(MyDLL.MyNamespace.PropertySorter))]
public class MyClass
{
private string m_Property;
public string Property
{
get { return m_Property; }
set { m_Property = value; }
}
// ... blah ...
}
any properties of type MyClass do not show up as expandable on a
PropertyGrid (it just shows up as greyed out). If I just use
ExpandableObjectConverter as the TypeConverter, it works fine; if I
copy the PropertySorter class into the main project, it works fine.
So, it seems to be something to do with using the TypeConverter from a
DLL.
I'm using .NET 2.0.... Any thoughts appreciated! If you need
clarification, please let me know.
Thanks,
Ben.