Hi all,
i am just running in an strange Error and need help finding a solution.
We just updated from VS 2019 to 2022. Same Project no changes.
Debugging on "old PC" without any error. Running on Machine with VS 2022 i get the above error.
I found that this is generating the error:
<syncfusion:GridTextColumn.CellStyle>
<Style TargetType="syncfusion:GridCell">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Dringlichkeit}" Value="Fertig ausgewertet">
<Setter Property="Background" Value="Green" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Dringlichkeit}" Value="Sofort">
<Setter Property="Background" Value="Red" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Dringlichkeit}" Value="Eilig">
<Setter Property="Background" Value="Yellow" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Dringlichkeit}" Value="PL Fehler">
<Setter Property="Background" Value="HotPink" />
</DataTrigger>
</Style.Triggers>
</Style>
</syncfusion:GridTextColumn.CellStyle>
Many thanks in advanced
Hi,
first of all many thanks for the reply.
I still didn`t find the Error on my side.
Here is a list of all assemblies with the Version and my xml File.
Hope to hear from you soon :)
|
<Window
x:Class="SfDataGridDemo.Chromeless"
xmlns:local="clr-namespace:SfDataGridDemo"
xmlns:grid="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF">
<grid:SfDataGrid x:Name="datagrid"
Margin="10,0,30,30"
AutoGenerateColumns="False"
LiveDataUpdateMode="AllowDataShaping"
ColumnSizer="Auto" AllowEditing="True"
ItemsSource="{Binding Stocks}" >
<grid:SfDataGrid.Columns>
<grid:GridTextColumn MappingName="Account">
<grid:GridTextColumn.CellStyle>
<Style TargetType="syncfusion:GridCell">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Account}" Value="AmericanFunds">
<Setter Property="Background" Value="Green" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Account}" Value="RetirementSavings">
<Setter Property="Background" Value="Red" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Account}" Value="Mortages">
<Setter Property="Background" Value="Yellow" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=Account}" Value="ChildrenCollegeSavi
<Setter Property="Background" Value="HotPink" />
</DataTrigger>
</Style.Triggers>
</Style>
</grid:GridTextColumn.CellStyle>
</grid:GridTextColumn>
<grid:GridTextColumn MappingName="LastTrade" TextAlignment="Right" />
<grid:GridTextColumn MappingName="PreviousClose" TextAlignment="Right" />
<grid:GridTextColumn MappingName="Open" TextAlignment="Right" />
</grid:SfDataGrid.Columns>
</grid:SfDataGrid>
|
Many thanks !!
Changing this:
<Style TargetType="syncfusion:GridCell">
also to:
<Style TargetType="grid:GridCell">
does the trick.
All running fine now.
Hi Tom,
We are glad that the reported issue has been resolved. Please let us know if you require any other assistance from us.
Regards,
Sampath Narayanan.S
I have exactly the same problem! The suggested solution did not work for me. Some SyncFusion grids work and others give this error, Ihave so far not been able to figure out why!
Hi Paul Lundberg,
We have checked the reported issue on our end. As we mentioned earlier, this issue
occurs because of ambiguity in the GridCell and it can be resolved by adding
a separate namespace for the DataGrid. Here we have attached the tested
sample and the video illustration for resolving the reported issue. Please have
a look at this. If you still facing the reported issue, modify the attached sample
based on your scenario along with the video illustration of the reported issue.
It will be helpful for us to check the cause of the issue and to provide a
solution at the earliest.
Regards,
Dhanasekar M.
If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.