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

Get entire object in converter

Thread ID:





143319 Mar 14,2019 03:18 AM UTC Mar 15,2019 10:21 AM UTC WPF 1
Tags: SfDataGrid
Asked On March 14, 2019 03:18 AM UTC

I'm trying to change the background of cell depending on their values. I found this KB 2601 and I would like to use converter but how can I send the entire object to converter not just cell mapped value ?

Deivaselvan Y [Syncfusion]
Replied On March 15, 2019 10:21 AM UTC

Hi xmen, 
Thanks for contacting Syncfusion support. 
You can get the object in the converter by leaving the Binding value and specify only the Converter as shown in the following code example. 
Code example :  
<syncfusion:GridTextColumn MappingName="Column1"> 
        <Style TargetType="syncfusion:GridCell"> 
            <Setter Property="Background" Value="{Binding  Converter={StaticResource NameToColorConvertor}}" /> 
We have modified the KB sample based on the above code snippet and it is available in the following link for your reference. 
Please let us know if you need any further assistance in this. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon