Hello everybody
I have written a converter class(implementing IValueConverter) which converts a code that comes from the database (for example "CTY") into a more user friendly description (for example "City"). I want to use the converter on a single Column in my XCeed WPF Datagridcontrol, but I do not know to which property I must set the Converter to. I also tried to attach it to a DataCell using a style (see below) but I think that is not necessary since the converter should apply to only one column and not every cell.
This is what I have now:
<utils:BudgettaireEntiteitConverter x:Key="BudgettaireEntiteitConverter" />
<Style TargetType="{x:Type xcdg:DataCell}">
<Setter Property="Content" Value="{Binding Converter={StaticResource BudgettaireEntiteitConverter}}" />
</Style>
When I come into the Convert function the value is of type Xceed.Wpf.DataGrid.EmptyDataItem which ofcoure throws an error when I want to convert it to a certain value.
How should I apply the converter to a column? Do you guys have any suggestions?
More examples or code can be provided if asked for. I hope my problem is a bit clear for you.