Sorting results in System.Reflection.AmbiguousMatchException
Clicking a column header to sort results in System.Reflection.AmbiguousMatchException. Yes, I tried this article: How to resolve ambiguous type reference exception? | WPF - GridTreeControl (syncfusion.com)
This is my code now:
<controls:ChromelessWindow x:Class="com.***.Client.Wpf.Windows.***.DispolistWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:com.***.Client.Wpf.Windows.***"
xmlns:controlsGrid="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"
xmlns:controls="http://schemas.syncfusion.com/wpf"
Style="{DynamicResource Titlebar***Style}"
mc:Ignorable="d"
Title="Grid"
Height="250"
Width="1600"
CloseButtonTemplate="{x:Null}">
<controls:ChromelessWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/ResourceDictionaries/***Dictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</controls:ChromelessWindow.Resources>
<Grid>
<controlsGrid:SfDataGrid Grid.ColumnSpan="2"
AllowGrouping="False"
AutoGenerateColumns="False"
AllowEditing="False"
SelectionMode="Single"
NavigationMode="Row"
GridLinesVisibility="Horizontal"
HeaderLinesVisibility="Vertical"
AllowSorting="True"
HeaderRowHeight="30"
AllowResizingColumns="True"
FontSize="14"
BorderBrush="#ccc"
RowStyle="{StaticResource dgOperationStateRowStyle}"
MouseDoubleClick="SfDataGrid_MouseDoubleClick"
ItemsSource="{Binding Operations}">
<controlsGrid:SfDataGrid.Columns>
<controlsGrid:GridTextColumn MappingName="Number" HeaderText="#" TextAlignment="Right" Width="80"/>
<controlsGrid:GridTextColumn MappingName="State" HeaderText="Status" ValueBinding="{Binding Path=State, Converter={StaticResource OperationStateToString}}"/>
<controlsGrid:GridDateTimeColumn MappingName="CreatedOn" HeaderText="Eröffnet" Pattern="CustomPattern" CustomPattern = "HH:mm 'Uhr'" Width="70"/>
<controlsGrid:GridTextColumn MappingName="Location" HeaderText="Ort"/>
<controlsGrid:GridTextColumn MappingName="Ressources" HeaderText="Ressourcen" ValueBinding="{Binding Path=Ressources, Converter={StaticResource ListToString}}"/>
<controlsGrid:GridTextColumn MappingName="Destination" HeaderText="Ziel"/>
</controlsGrid:SfDataGrid.Columns>
</controlsGrid:SfDataGrid>
</Grid>
</controls:ChromelessWindow>
The dictionary:
<!-- DataGrid Styles -->
<Style x:Key="dgOperationStateRowStyle" TargetType="controlsGrid:VirtualizingCellsControl">
<Setter Property="Background" Value="{Binding State, Converter={StaticResource OperationStateToColor}}" />
</Style>
<!-- End:DataGrid Styles-->
Thank you
SIGN IN To post a reply.
1 Reply
VS
Vijayarasan Sivanandham
Syncfusion Team
November 11, 2021 11:58 AM UTC
Hi Sebastian,
Thank you for contacting Syncfusion Support.
We have prepared the simple sample based on provided code snippet from our end. The reported issue “Sorting results in System.Reflection.AmbiguousMatchExceptio” and unable to replicate the issue from our end. It is working fine as expected. Please find the tested sample and video demo from our end in the link below,
Thank you for contacting Syncfusion Support.
We have prepared the simple sample based on provided code snippet from our end. The reported issue “Sorting results in System.Reflection.AmbiguousMatchExceptio” and unable to replicate the issue from our end. It is working fine as expected. Please find the tested sample and video demo from our end in the link below,
Please have a look at this sample and let us know if we have missed any customization done in your application. Otherwise try to reproduce the reported issue in this sample and revert to us with the modified sample and steps to replicate the issue. It will be more helpful for us to find the exact cause for the issue and to provide a prompt solution.
Regards,
Regards,
Vijayarasan S
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
SE Sebastian
- Nov 10, 2021 02:10 PM UTC
- Nov 11, 2021 11:58 AM UTC