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

Conditional Formating in c# for GDC

Thread ID:





116181 Apr 21,2014 07:08 PM UTC May 30,2014 09:44 AM UTC WPF 6
Tags: GridDataControl
Asked On April 21, 2014 07:08 PM UTC


Do you have an example of conditional formating done in c# and not in XAML ?

Similar to the pivotgrid here : http://help.syncfusion.com/ug/wpf/pivot%20analysis/default.htm#!documents/1627conditionalformatting.htm

but for GDC

I can't figure out the names & I need to do that at run time



Ganesan V [Syncfusion]
Replied On April 23, 2014 01:45 PM UTC

Hi Fff,

Thanks for using Syncfusion Products.

We have attached a sample based on your requirements. Find the attached sample.

Please let us know if this helps.


Ganesan V

Attachment: Sample_c7c7cdfa.zip

Replied On April 25, 2014 05:59 AM UTC

Thanks Ganesan, your sample rocks !
(Can you please have a look to my question about binding in c# to 3 collections in the same forum?)

Thanks again !

Ganesan V [Syncfusion]
Replied On May 2, 2014 01:09 PM UTC

Hi Fff,

Thanks for your patience.

We have created a sample to achieve your requirement such as binding 3 observable collection using SfDataGrid control.

You can find the attached sample under the following location: 

Please let us know if you have any queries.


Ganesan V

Attachment: WpfApplication3_9bfaf494_25971809.zip

Ganesan V [Syncfusion]
Replied On May 6, 2014 12:57 PM UTC

Hi Fff,

Sorry for the inconvenience caused. 

In our previous update, we have wrongly updated the sample using SfDataGrid instead of GridDataControl. Now we have created the sample with binding 3 collection in c# using GridDataControl. Please find the attached sample under the following location.

Please let us know if you have any queries.


Ganesan V

Attachment: GDCWithBinding3Collection_3365128c.zip

Replied On May 27, 2014 07:37 PM UTC

Hi Ganesan,

The c# you provided works good and I have applied it a lot !

However I came to a strange case:

I would like to do some conditional formatting if there is no value in the cell = binded database returns 'null'

As value for the parameter, I have tried null

I have tried also '' (single quote)

I have tried also"" (double quote)

..... all # above are giving me a compile error ... and no idea what else to test to detect that

So how can I test that null in conditional formatting ?



Ganesan V [Syncfusion]
Replied On May 30, 2014 09:44 AM UTC

Hi Fabrice,

We have analyzed the reported issue “Compilation Error while apply Conditional formatting for null values in Grid” and we have applied the conditional formatting for null values, but we are unable to reproduce the issue. Please refer the attached sample. 

Please let us know if you have any queries,


Ganesan V

Attachment: GDCConditionalFormatingForNullValue_4f2e425b.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

or the page will be automatically redirected to 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