Complex properties in the PropertyGrid
Such a property I need to edit in the PropertyGrid.
The property structure is array of int values, where array length is variable.
The problem arise when I try to edit array length and array elements simultaneously, i.e. in the same PropertyGrid. When I have one array element per one string in the PropertyGrid
how can I vary (acording to array length ) the number of strings in the PropertyGrid.
The point is that array elements in my class are represented by the separate properties something like this:
[DescriptionAttribute(“This is element N1 of my array”),
BrowsableAttribute(true),
DefaultValueAttribute(20)]
public int Element1
{
get {return this.element1;}
set {this.element1 = value;}
}
How can I vary the number of such properties in my class?
Thank you.