PropertyGrid

G

Guest

Hi there. I try the following

class test
{
private Int32 a,b;
public Int32 A {get{return(a);}}
public Int32 B {get{return(b);}}
}

class testContainer
{
private test[] cont=new test[30];
[TypeConverter(typeof(ExpandableObjectConverter))]
public test[] CONT {get{return(cont);}}
}

giving an istance of testcontainer to the propertigrid show me the CONT
property as a collection in a poput collection editor, while I'd like to see
each item of the array expandable in the property grid itself.

I tryed something with the TypeCoverter but maybe I didn't got the right way.

Any help!?

Thanks
Cristian Mori
 
G

Guest

Foud it!
I just hat to place the decoration
[TypeConverter(typeof(ExpandableObjectConverter))]
on top of the test class and to remove it from the array

[TypeConverter(typeof(ExpandableObjectConverter))]
class test
{
private Int32 a,b;
public Int32 A {get{return(a);}}
public Int32 B {get{return(b);}}
}

class testContainer
{
private test[] cont=new test[30];
public test[] CONT {get{return(cont);}}
}
 

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