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 formatting for cells

Thread ID:





81364 May 19,2009 04:14 PM UTC May 23,2009 06:27 AM UTC WinForms 1
Tags: GridControl
Abhinav Sarvaiya
Asked On May 19, 2009 04:14 PM UTC

Can I do conditional formatting for individual cells in a Syncfusion grid grouping control. I dont want to format the whole record, just the individual cell based on a certain condition.

Lingaraj S [Syncfusion]
Replied On May 23, 2009 06:27 AM UTC

Hi Abhinav,

Thank you for your interest in Syncfusion product.

In GridGroupingControl the cell formatting done through the GridTableCellStyleInfo. If you need to format the cell, then please try using GridTableCellStyleInfo or Style property in QueryCellStyleInfo event to achieve this behaviour.

Please refer the code below:

// through GridStyleInfo
GridTableCellStyleInfo style=this.grid.TableModel[1, 2];
// through WueryCellInfo
this.gridControl1.QueryCellStyleInfo += new GridQueryCellInfoEventHandler(grid_QueryCellStyleInfo);
void grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
if (e.TableCellIdentity.RowIndex == 2 && e.TableCellIdentity.ColIndex == 5)

Let me know if it helps.

Lingaraj S.


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