I have the following code:
fls.EditorType = typeof(XamComboEditor);
Style styleComboEditor = new Style(typeof(XamComboEditor));
Binding bind = new Binding() { Source = EnumHelper.GetList(enumType) };
bind.BindsDirectlyToSource =
true;
styleComboEditor.Setters.Add(
new Setter(XamComboEditor.ItemsSourceProperty,bind));
new Setter(XamComboEditor.IsEditableProperty, true));
new Setter(XamComboEditor.DisplayMemberPathProperty, "Value"));
new Setter(XamComboEditor.ValuePathProperty, "Key"));
fls.EditorStyle = styleComboEditor;
My enum looks like this:
public
SecurityLevel
{
Administrator = 0,
[
)]
GeneralUser = 5,
ReadOnly = 9,
}
The values appear in the drop down. but the actual value in the column is still the original value from the database. What am I doing wrong?
Thanks,
Linda Rawson
From the snippet provided I cannot tell what your items coming from your GetList method are returning. It would appear that you must be returning an object where the database value is stored in a property of the item named Key and the value you want the end user to see is stored in a property of the item named Value but then that should be working. Can you provide a functional sample that demonstrates the issue?