Hi,
I have a column in a datacontext which is an integer( 0,1)
While displaying these in the Xamdatagrid, i want to display: 0 as "NO" & 1 as "Yes".
Could somebody please guide me thru this?? Thanks!!
Hello,
For this, you can use IValueConverter class and apply it to the Field's Converter property. the converter would look something like this:
class ValueToEnumConverter :IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
if (value == null)
return Binding.DoNothing;
if (value.ToString() == "1")
return "Yes";
else
return value;
}
...
Hope this helps.