I have a RadDataGrid, wherein, I have multiple autogenerated columns and I want to display "yes/no" text in DataGridBooleanColumn but I could not find any way to do so.
Could you please help me to achieve this scenario?
Regards
1 Answer, 1 is accepted
0
Lance | Manager Technical Support
Telerik team
answered on 10 Apr 2017, 09:34 PM
Hello Milan,
For this, you need to use a TemplateColumn with a TextBlock.
Note that if your bound object is a bool, then you'll also need to use a converter to return the string values of "Yes" and "No"
For example:
class BoolToYesNoConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return (bool) value ? "Yes" : "No";
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
You can find more information about column types and properties here.
Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items