I though I would break this question out. Alex posted a nice type converter here
http://llblgen.com/tinyforum/Messages.aspx?ThreadID=7355
I implemented it in a project and it went pretty well until I tried a form that was databound. It only works 1 way now instead of 2 way. The entity is bound to a combo box with the enum values in it. The entity will update the combo when it changes, but the combo won't update the entity when a user changes the combo. As soon as they tab off of it, it goes back to the entity's value.
the type converter takes a string from the db 0-9 (but in a varchar(1) field) and goes to an account type, asset, liability etc.
the combo is an infragistics combo so it has a valuemember variable and a displaymember variable.
the combo is loaded from a datatable with 2 columns, ID and Values. Values is a string of asset, liability etc.
Id was a string type with 1, 2 etc
then it was an int with 1 ,2 etc,
then it was typed as the actual enum
none of them worked with 2 way binding. both the int and enum type worked with 1 way. String might have, but I don't remember.
Any ideas?