Hi
In quite a few places i am using converters with the RadGridView to convert the values in the domain model to values presented in the users. I have attached an example where a column is bound to an enum which is converted to a string by a IValueConverter (by using a ressource file for easy i18n)
As there seems to be no support for the converter notion directly in the RadGridView i have done this in the following way:
However when i then group on these columns, the value is of course not converted. I have attached a screenshot showing this.
I could probably just define a custom group header template. But the only thing i want is to get the value passed through my converter.
Is there an easy way to acheive this? If using a custom group header tempalte, how would i do this so it looks like the default group headers - but just with the value from the columns converted?
In quite a few places i am using converters with the RadGridView to convert the values in the domain model to values presented in the users. I have attached an example where a column is bound to an enum which is converted to a string by a IValueConverter (by using a ressource file for easy i18n)
As there seems to be no support for the converter notion directly in the RadGridView i have done this in the following way:
<telerik:GridViewDataColumn x:Name="sourceColumn" IsReadOnly="True" Header="Source"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding RouteSource, Converter={StaticResource RouteSourceConverter}}" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate></telerik:GridViewDataColumn>However when i then group on these columns, the value is of course not converted. I have attached a screenshot showing this.
I could probably just define a custom group header template. But the only thing i want is to get the value passed through my converter.
Is there an easy way to acheive this? If using a custom group header tempalte, how would i do this so it looks like the default group headers - but just with the value from the columns converted?