Hi all,
I'm trying to use a property grid, and what I'm trying to do seems to
really elude me. I've been using the property grid for a short period
of time, and this is the first thing I haven't been able to do.
I have some products... like t-shirts... and these products have
particular property / value pairs. I'd like the property grid to look
like this:
Category Clothing
Type T-Shirt
Properties
Color Purple
Material Cotton
Size XL
I'd even settle for something like:
Category Clothing
Type T-Shirt
Properties
Property
Name Color
Value Purple
Property
Name Material
Value Cotton
.... or...
Category Clothing
Type T-Shirt
Properties
[0]
Name Color
Value Purple
[1]
Name Material
Value Cotton
The problem is that I don't know the properties or the values. Both
are dynamic. That is that I have no idea what the properties (color
material size) or values (purple, cotton, xl) are. The product object
uses a SortedList<string, string(i've also tried using arrays and
other structures) to store the key and value. And, additionally, I'd
like the value to be able to show a dropdown of all the possible
values for that key.
What I keep ending up with is something like:
Category Clothing
Type T-Shirt
Properties
Properties (Collection)
The collection brins up the collection editor, but I can't add or
change anything.
When I tried using arrays (and other structures), I ended up with
something like:
Category Clothing
Type T-Shirt
Properties
[0] Color
[1] Material
[2] Size
As you can see, neither of these is acceptable because it does not
give the user the desired editing capabilities of the above examples.
I've been using the MSDN article at
http://msdn.microsoft.com/library/de...ngpropgrid.asp
It has given me a really good starting point, but I just can't seem to
get any more out of the grid. Has anyone else attempted something
like this? Does anyone have any good examples or links?
Sincerely,
John Kraft