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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Applying conditional formatting based on value of other cells

Thread ID:





115880 Feb 17,2014 03:40 PM UTC Feb 27,2014 11:46 AM UTC WPF 1
Tags: GridDataControl
Luca Cavicchioli
Asked On February 17, 2014 03:40 PM UTC

Hello, sorry if the question may be trivial, but I'm new of WPF and Syncfusion controls.
I've to apply a format to a cell if the value of another cell of the same row satisfies the condition specified.

var columnFormatting = new GridDataConditionalFormat { [...] };
var columnStyleInfo = new GridDataStyleInfo { [...] };
var conditionFormatting = new GridDataCondition
ColumnName = myColumnName,
ConditionType = GridDataConditionType.NotEquals,
Value = [***** Value contained in the cell of the same row and column named "myColumnName2" *****],
PredicateType = PredicateType.Or

columnFormatting.Style = columnStyleInfo;

How is it possible to do that?
Thank you for your support. Regards
    Luca Cavicchioli

Saravanan M [Syncfusion]
Replied On February 27, 2014 11:46 AM UTC

Hi Luca,

We are sorry for delay caused,

 We have analyzed your query. We could not add Conditional Format based on next cell value. We can add the conditional format based on the same column value. But we are able to format the cell based on next cell value by using QueryCellInfo event. We have prepared the sample based on this and you can download the sample from attachment.

 Please let us know if you have any queries,



Attachment: GDC_Sample_FormatCells_bc6b109e.zip


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