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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Question about StyleSelectors (Background Property not recognized)

Thread ID:

Created:

Updated:

Platform:

Replies:

118228 Feb 12,2015 08:30 PM UTC Sep 3,2015 09:08 AM UTC WPF 5
loading
Tags: SfDataGrid
SXTrader
Asked On February 12, 2015 08:30 PM UTC

Hello,
I'm trying to set the color of the border of a row in dependency of a value in the MVVM.
I found following documentation on your site: http://help.syncfusion.com/ug/wpf/default.htm#!documents/styleselectors.htm

Now I tried to translate this in a way I want to have:

<UserControl.Resources>
        <converters:BetMethodConverter x:Key="converterBetMethod" />
        <converters:NonRunnerConverter x:Key="nonRunnerImageConverter"/>       
        <Style x:Key="gridRowBetStyle" TargetType="syncfusion:VirtualizingCellsControl">
            <Style.Triggers>
                <DataTrigger Binding="{Binding HasBet}" Value="True">
                    <Setter Property="Background" Value="Bisque" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

But the IDE keeps telling me that the Property "Background" is not a element of Syncfusion.Windows.Controls.Cells.VirtualizingCellsControl.

Can you tell me what's wrong?

Jai Ganesh S [Syncfusion]
Replied On February 13, 2015 12:52 PM UTC

Hi SXTrader,

 

Thank you for using Syncfusion Products.

 

We have analyzed your query. We have prepared the sample to set the row background based on the MVVM pattern but we are not getting any exception. Could you please check this sample and if you still got the exception, please modify this sample along with the replication procedure? This would be helpful to provide a better solution.

 

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/SfGrid_StyleSelector228717480.zip

 

Please let us know if you have any other queries.

 

Thank you,

Jai Ganesh S


Diego Fernando Urabayen
Replied On April 27, 2015 12:22 PM UTC

The VirtualizingCellsControll property does not appear in my project. Can you help me?

Attachment: RowStyle.png_305f0721.zip

Jai Ganesh S [Syncfusion]
Replied On April 28, 2015 02:31 PM UTC

Hi SXTrader,


Sorry for the inconvenience caused.


We have checked the reported issue with our sample but we are unable to reproduce the issue and it worksfine 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,


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


Please let us know if you have any other queries.


Thank you,

Jai Ganesh S



SXTrader
Replied On September 2, 2015 07:32 PM UTC

Hello,
could you please take a look into the attached example. For Some reason I've got this behaviour again.



Attachment: SXTippster_example_background_78df7217.zip

Jai Ganesh S [Syncfusion]
Replied On September 3, 2015 09:08 AM UTC

Hi SXTrader,


Sorry for the inconvenience caused.


We have analyzed your issue and we found that we are having “VirtualizingCellsControl” class in both Syncfusion.UI.Xaml.Grid (present in Syncfusion.SfGrid.Wpf.dll) and Syncfusion.Windows.Controls.Cells (Present in Syncfusion.Grid.Wpf.dll) namespaces. The provided sample refer to both Syncfusion.SfGrid.Wpf.dll and also Syncfusion.Grid.Wpf.dllHence both namespaces are added to the below schema “http://schemas.syncfusion.com/wpf in your application. So this designer shows errors. However you can overcome this problem by creating the separate namespace of SfDataGrid and use that namespace in VirtualizingCellsControl class.



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


<Style x:Key="gridRowBet" TargetType="sfgrid:VirtualizingCellsControl">

            <Style.Triggers>

                <DataTrigger Binding="{Binding HasBet}" Value="True">

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

                </DataTrigger>

            </Style.Triggers>

</Style>


We have also modified your sample based on this and you can download the sample from the below location,


Sample: http://www.syncfusion.com/downloads/support/directtrac/141954/ze/SXTippster_exampl_modifed1044293574


Please let us know if you need further assistance.


Thank you,

Jai Ganesh S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;