Compatibility conflict in BoldReports.WPF and Syncfusion.SfGrid.WPF

I installed the Syncfusion.SfGrid.WPF package from Nougat and set up a DataGrid with alternating rows with this:


In the app:


             <Style TargetType="syncfusion:VirtualizingCellsControl" x:Key="alternatingRowStyle2">

                 <Setter Property="Background" Value="Bisque"/>

             </Style>


             <Style TargetType="syncfusion:VirtualizingCellsControl" x:Key="RowStyle2">

                 <Setter Property="Background" Value="Beige"/>

             </Style>


And in the data grid control:

AlternatingRowStyle="{StaticResource alternatingRowStyle}" AlternationCount="2" RowStyle="{StaticResource RowStyle}"


And it worked great.


I have now added the BoldReports.WPF package to the project and since installing it I get the following error on build:


Severity Code Description Project File Line Suppression State

Error Cannot find the Style Property 'Background' on the type 'Syncfusion.Windows.Controls.Cells.VirtualizingCellsControl'. Line 195 Position 25. Adardar Q:\VisualStudio\Adardar\Adardar\App.xaml 195



When I delete the matches of the above lines, it works fine


1 Reply

DD Dhivyabharathi Dakshinamurthy Syncfusion Team March 6, 2024 09:09 AM UTC

Hi Eyal_Gilboa,

Your reported issue may occur when using the common namespace http://schemas.Syncfusion.com/wpf.

To resolve this issue for Sfdatagrid by declaring the namespace for VirtualizingCellsControl explicitly by specifying assembly as below, 

xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF”

Kindly refer the below code snippets and attached the sample for your reference.

     xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF">

 <Window.Resources>

    

     <Style TargetType="syncfusion:VirtualizingCellsControl">

        

         <Setter Property="Background" Value="Bisque"/>

        

     </Style>

    

 </Window.Resources>


Attachment: SfDataGrid_Demo_18dca270.zip

Loader.
Up arrow icon