Hello,
We are currently evaluating WPF controls for use in our applications.
Currently, we use plain WPF Datagrid with a lot of converters for string representation (non-edit mode) and parsing (edit mode).
We would like to re-use them when it is possible, but we have problems: despite what I read in the documentation, the following code
fails to call ConvertBack on our converter, calling instead a RadGridView internal functions and giving an ArgumentNullException (Parameter name: conversionType) in Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCell.TryConvertValueFromEditor
The equivalent WPF code
works without errors.
Are we doing something wrong? How do you use converters in a grid?
Thanks,
Lorenzo
We are currently evaluating WPF controls for use in our applications.
Currently, we use plain WPF Datagrid with a lot of converters for string representation (non-edit mode) and parsing (edit mode).
We would like to re-use them when it is possible, but we have problems: despite what I read in the documentation, the following code
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
TextBox
Text
=
"{Binding Path=., Mode=TwoWay, Converter={StaticResource NamespaceConverter}}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
fails to call ConvertBack on our converter, calling instead a RadGridView internal functions and giving an ArgumentNullException (Parameter name: conversionType) in Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCell.TryConvertValueFromEditor
The equivalent WPF code
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
TextBox
Text
=
"{Binding Path=., Mode=TwoWay, Converter={StaticResource NamespaceConverter}}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
works without errors.
Are we doing something wrong? How do you use converters in a grid?
Thanks,
Lorenzo