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

Override a column style with conditional format

Thread ID:





97512 Dec 4,2010 09:57 PM UTC Dec 7,2010 12:39 PM UTC WinForms 1
Tags: GridControl
Bandar Alfatta
Asked On December 4, 2010 09:57 PM UTC

Dear Sir,
In Grid.Grouping; If I override a grid appearance style (grid level) with a conditional format style it applied successfully, but when I try to override the style of a column (column level) with a conditional Format style which is not applicable on that column only and it applied on the rest of the columns which inherits the grid style.

How to overrides a column style with conditional format??

in the attachment, i need to apply red color on the whole row regardless of any other style on any column.

Please help!


Nirmal Raja [Syncfusion]
Replied On December 7, 2010 12:39 PM UTC

Hi Bandar,

Thank you for your interest in Syncfusion products.

I am able to see the behavior of the Appearance object in ColumnDescriptor which overrides the setting provides in the conditional format. To have the ConditionalFormat over the column appearance, you can use the QueryCellStyleInfo event and apply the same conditions by getting the values individually as a work around.

Please refer the code below:
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record)
object value1 = e.TableCellIdentity.DisplayElement.ParentRecord.GetValue('FirstName');
object value2 = e.TableCellIdentity.DisplayElement.ParentRecord.GetValue('ID');
if (value1.ToString() == 'Charlotte' && value2.ToString() == '1')
e.Style.TextColor = Color.Chocolate;
e.Style.BackColor = Color.Purple;

Also, refer the sample attached in the below location:



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