We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

VirtualizingCellsControl issue

It is not possible to select VirtualizingCellsControl in the TargetType because only appear VirtualizingCellsControlChildFrame and the Property Background is not accepted.

         <sf:ChromelessWindow x:Class="Cronometrarg.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:context="clr-namespace:Util.Context;assembly=Util"

        xmlns:business="clr-namespace:Business.Collections;assembly=Business" 

        xmlns:sf="http://schemas.syncfusion.com/wpf"

        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 

        xmlns:enum="clr-namespace:Model.Enum;assembly=Model"

        xmlns:sys="clr-namespace:System;assembly=mscorlib"

        Height="800" Width="1000" 

        Icon="/Cronometrarg;component/Images/IconoCronometrarg.ico"

        WindowState="Maximized" 

        Loaded="Window_Loaded"

        Closing="Window_Closing"

        sf:LayoutControl.SetMetroMode="True">

...

     <Style x:Key="myStyle" TargetType="sf:VirtualizingCellsControlChildFrame">

            <Style.Triggers>
                  <DataTrigger Binding="{Binding ReaderStatus}" Value="Disable">
                         <Setter Property="Background" Value="Green"/>
                  </DataTrigger>
             </Style.Triggers>

     </Style>


...


13 Replies

JG Jai Ganesh S Syncfusion Team May 28, 2015 01:34 PM UTC

Hi Diego,


Thank you for using Syncfusion products.


We have checked the reported issue with our sample but we are unable to reproduce the issue and it works fine in our end. Could you please check the name space and dlls are added properly in your project? We have also attached the sample and video for your reference,


VideoLink: http://www.syncfusion.com/downloads/support/directtrac/137224/VirtualizingIssue599575384.zip


Sample: http://www.syncfusion.com/downloads/support/directtrac/135129/SfGridVirtualizingCellsControlSample-198089233.zip


Please let us know if you have any other queries.


Thank you,

Jai Ganesh S



DF Diego Fernando Urabayen May 28, 2015 02:26 PM UTC

Ji Jai,

The issue is very estrange because I have a same libraries with your sample. What dll we need to reinstall??  I attach a print screen of my project.

Regards,

Diego


Attachment: Captura_de_pantalla_d0f7e1ac.zip


DF Diego Fernando Urabayen May 28, 2015 06:00 PM UTC

I send you the project with the issue.

Regards,

Diego


Attachment: VirtualizingCellsControl_c92dc82b.zip


JG Jai Ganesh S Syncfusion Team May 29, 2015 03:24 PM UTC

Hi Diego,


Sorry for the inconvenience caused.


We have analyzed your query with your sample. In that you have used Grid.WPF and SfGrid.WPF dlls. These tow dlls having VirtualzingCellsControl and these controls namespace added in xmlns: sf="http://schemas.syncfusion.com/wpf". Hence the VirtualizingCellsControl is not displayed in intellisense. So could you please remove the unused dlls from the project to resolve this issue?


If you would like to use both the controls, you can refer the VirtualizingCellsControl namespace from different schema. Please refer the code snippet below,


Code Snippet [XAML]:


xmlns:SfGrid=http://schemas.syncfusion.com/wpf

xmlns:Gdc=http://schemas.syncfusion.com/wpf


Window.Resources>

        <Style x:Name="SfGridStyle" TargetType="SfGrid:VirtualizingCellsControl">

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

        </Style>

        <Style x:Name="GdcStyle" TargetType="Gdc:VirtualizingCellsControl">

            <Setter Property="Background" Value="Blue"

        </Style>

 </Window.Resources>



Please let us know if you need further assistance.


Thank you,

Jai Ganesh S



DF Diego Fernando Urabayen May 29, 2015 07:08 PM UTC

Hi Jay,

The foreground property is not setted in my project, but it in your sample works fine. Can you help me with this? Other properties do not work, for example, Row Height.

Thanks,

Diego


Attachment: DockingManager_1aba7f00.zip


MA Muthukumar A Syncfusion Team June 1, 2015 12:46 PM UTC

Hi Diego,

We were able to reproduce the issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

Please let us know if you have any questions.

Regards,
Muthukumar A


JG Jai Ganesh S Syncfusion Team June 1, 2015 03:00 PM UTC

Hi Diego,


Sorry for the inconvenience caused.


We have analyzed your queries and please find the responses for your queries as follows:


Query 1: (The foreground property is not setted in my project)


As we updated in our last update, we are able to reproduce this issue when we load the SfDataGrid inside the DockingManager and we have created an incident under your account. We request you to follow up the incident for further updates regarding this issue. Please refer the following link:


https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents


Query 2: (Other properties do not work, for example, Row Height.)


You can set the RowHeight in SfDataGrid by using RowHeight property:


Code snippet [Xaml]:



<sf:SfDataGrid x:Name="dgReaders"

                                AutoGenerateColumns="False"

                                RowHeight="30"

                                ItemsSource="{Binding GDCSource}"/>


Please let us know if you need further assistance.


Thank you,

Jai Ganesh S



SR Soumyajit Roy September 22, 2015 01:57 PM UTC

Hi,

I had this similar problem. I removed unused DLLs - syncfusion.Grid.wpf.dll and suncfusion.GridCommon.wpf.dll from the project reference, it worked.

Thanks,
Soumyajit Roy



JG Jai Ganesh S Syncfusion Team September 23, 2015 04:19 AM UTC

Hi Soumyajit,


Thank you for the update.


Please let us know if you need further assistance on this.


Thank you,

Jai Ganesh S



NW Nicolas Wagener December 7, 2021 07:44 AM UTC

Hello,


I am experiencing the same issue Diego experienced on  May 28, 2015 07:00 PM.

I Have  a project that reference both Syncfusion.Grid.WPF and Syncfusion.SfGrid.WPF and I try to use a style targetting the VirtualizingCellsControl.


I am using this version of the synfusion library : 19.3.0.43 .NET Core 3.1

The workaround proposed byJai Ganesh S (May 29, 2015 04:24 PM) was not successfull for me.

Here is my little test project.


Thank you for the help !

Nicolas


Attachment: VirtualizingCells_8f2ec709.rar


VS Vijayarasan Sivanandham Syncfusion Team December 8, 2021 01:33 PM UTC

Hi Nicolas Wagener,

Thank you for contacting Syncfusion Support.

Based on provided information your reported issue occurs due to both Syncfusion.SfGrid.WPF and Syncfusion.Grid.WPF or Syncfusion.GridCommon.WPF dlls are present in common namespace http://schemas.Syncfusion.com/wpf. Also VirtualizingCellsControl control is present in both the dlls with same name, it leads to Cannot find the Style Property 'Background' on the type reference exception if you reference http://schemas.Syncfusion.com/wpf to your project.

You can resolve the reported problem by
declare the namespace for VirtualizingCellsControl explicitly by specifying assembly as below, 
xmlns:Syncfusion=”clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF”

Please refer the below code snippet,
 
<Window x:Class="VirtualizingCells.MainWindow" 
        xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"         
        Title="MainWindow" Height="450" Width="800"> 
 
    <Window.Resources> 
        <!--Style for the main grid CMR--> 
        <Style x:Key="RowStyle" TargetType="syncfusion:VirtualizingCellsControl" > 
            <Style.Triggers> 
                <DataTrigger Binding="{Binding Path=StatusValue}" Value="True"> 
                    <Setter Property="Background" Value="Yellow"/> 
                    <Setter Property="FontStyle" Value="Oblique"/> 
                </DataTrigger> 
                <DataTrigger Binding="{Binding Path=StatusValue}" Value="False"> 
                    <Setter Property="Background" Value="White"/> 
                </DataTrigger> 
            </Style.Triggers> 
        </Style> 
        <Style x:Key="alternatingRowStyle" TargetType="syncfusion:VirtualizingCellsControl" BasedOn="{StaticResource RowStyle}"> 
            <Setter Property="Background"> 
                <Setter.Value> 
                    <SolidColorBrush Opacity="0.5" Color="Transparent" /> 
                </Setter.Value> 
            </Setter> 
        </Style> 
    </Window.Resources> 
     
    <Grid> 
 
    </Grid> 
</Window> 
For more information related to ambiguous type reference exception, please refer the below knowledge base documentation link,

KB Link: https://www.syncfusion.com/kb/5712/how-to-resolve-ambiguous-type-reference-exception

Please let us know if you have any concerns in this. 
 
Regards, 
Vijayarasan S 



NW Nicolas Wagener December 13, 2021 05:08 AM UTC

Hello  Vijayarasan S ,


Thank you for the response, it works fine with this tips.


Have a nice day !

Regards,


Nicol



VS Vijayarasan Sivanandham Syncfusion Team December 13, 2021 05:59 AM UTC

Hi Nicolas Wagener,

We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you😊.

Regards,
Vijayarasan S


Loader.
Live Chat Icon For mobile
Up arrow icon