Easy converter support in group header (and columns)?

1 posts, 0 answers
  1. Henrik
    Henrik avatar
    5 posts
    Member since:
    Jun 2011

    Posted 13 Feb 2012 Link to this post

    * 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?
Back to Top