Hello everyone,
we have a simple RadGridView with one column bound to a enum property of a view model with a converter:
ViewModel:
And the converter code simply translates the bound enum value to a more readable text:
The grid is rendered correctly ("TestEnum with Value A"), but all drop downs located in the extended filter are using the raw values ("A", "B", "C") of our enum and not the transformed values for our converter.
Is there a way to work around this issue (beside translating the values prior to binding, i.e. coding a seconding property and doing the translation without a converter)?
Version: RadControls for WPF Q1 2011
FYI - I can provide a simple c# test project in order to reproduce the issue if needed.
Your sincerely,
Christian
we have a simple RadGridView with one column bound to a enum property of a view model with a converter:
<telerik:GridViewDataColumn DataMemberBinding="{Binding SomeValue, Converter={StaticResource TestConverter}}" />ViewModel:
public class TestViewModel { public TestEnum SomeValue { get; set; } } public enum TestEnum { A, B, C }And the converter code simply translates the bound enum value to a more readable text:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { var test = (TestEnum)value; switch (test) { case TestEnum.A: return "TestEnum with Value A"; case TestEnum.B: return "TestEnum with Value B"; case TestEnum.C: return "TestEnum with Value C"; } throw new NotImplementedException(); }The grid is rendered correctly ("TestEnum with Value A"), but all drop downs located in the extended filter are using the raw values ("A", "B", "C") of our enum and not the transformed values for our converter.
Is there a way to work around this issue (beside translating the values prior to binding, i.e. coding a seconding property and doing the translation without a converter)?
Version: RadControls for WPF Q1 2011
FYI - I can provide a simple c# test project in order to reproduce the issue if needed.
Your sincerely,
Christian