TypeConverter for object type Properties
- From: Jeronimo Bertran <jeronimo.bertran@xxxxxxxxxxxxxxxx>
- Date: Thu, 06 Mar 2008 22:36:08 -0800
I have a property with a member of type object. I am showing the value of
this property in a PropertyGrid but depending on the type of the object I
want to use the correspondant TypeConverter. Here is an example of what I
mean:
public byte[] Test
{
get { return new byte[100]; }
}
public object Test2
{
get { return new byte[100]; }
}
If I have both properties in a property grid, Test will be shown as an
expandable item with the text "Byte[] Array".. if I expand the item I will
be able to see all of the elements in the array. However, Test2 will only
show the text "System.Byte[]" and I will have no way of reading the
elements of the array.
Of course the property of type object will not always contain a byte[].
How can I provide the standard functionality for each type?
Thanks
.
- Follow-Ups:
- Re: TypeConverter for object type Properties
- From: VisualHint
- Re: TypeConverter for object type Properties
- Prev by Date: RE: Problems with UNICODE Characters for superscript 4,5,6,7,8,9
- Next by Date: Problem with windows datagrid in .net 1.1 with tablestyle.
- Previous by thread: RE: Problems with UNICODE Characters for superscript 4,5,6,7,8,9
- Next by thread: Re: TypeConverter for object type Properties
- Index(es):
Relevant Pages
|
|