This is a migrated thread and some comments may be shown as answers.

Easy converter support in group header (and columns)?

0 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 13 Feb 2012, 10:31 AM
* Sorry! * This Should have been in the WPF forum. This topic may be deleted!

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:

<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 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?

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Henrik
Top achievements
Rank 1
Share this question
or