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

GridDataConditionalFormat in code

Thread ID:





96768 Oct 4,2010 09:27 PM UTC Oct 11,2010 05:39 AM UTC WPF 1
Tags: GridControl
Bill Blair
Asked On October 4, 2010 09:27 PM UTC

I want to set the conditional formats in code. I would think this works:

GridDataConditionalFormat format1 = new GridDataConditionalFormat();
format1.Name = "format1";

GridDataStyleInfo styleInfo = new GridDataStyleInfo();
styleInfo.Background = Brushes.Red;
format1.Style = styleInfo;
format1.ApplyStyleToColumn = "Volume";

GridDataCondition condition1 = new GridDataCondition();
condition1.ColumnName = "Volume";
condition1.ConditionType = GridDataConditionType.GreaterThan;
condition1.PredicateType = Syncfusion.Windows.Data.PredicateType.Or;
condition1.Value = 500;

but I get an:

{"Object reference not set to an instance of an object."} error.

I am binding to a dataset and don't set any conditions in xaml. What I am doing wrong?

Balaji K [Syncfusion]
Replied On October 11, 2010 05:39 AM UTC

Hi Bill,

Thanks for your patience.

We are afraid that we are unable to reproduce the issue mentioned. Please revert us the modifying the attached sample and steps to reproduce the same.




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