It looks like GetPropertyConvert and SetPropertyConvert were designed for the string <-> SmartDate conversion only.
I do a lot of conversions string <-> NameValueList like:
public string Status
and could use a NameValueList converter.
Where do I sign for the wish list?
GetPropertyConvert/SetPropertyConvert work with any convertible values or values that can be cast from one type to another. They use the CoerceValue() helper method, which uses every technique I'm aware of in .NET to try and convert the values from one type to another.
This doesn't include looking up values in lists - that's way beyond type coercion and requires knowledge of the structure of the list and the elements contained in the list.
To do what you are describing I typically have two properties and a business rule or two. When one of the properties is set, the business rule is triggered, and in the rule it locates the value in the lookup list and sets the other property.
So I might have Status and StatusId properties. Set StatusId to a value, and it has a business rule that changes Status (via LoadProperty() to avoid an infinite loop).
Copyright (c) Marimer LLC