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.
Unfortunately, activation email could not send to your email. Please try again.

how can i change a particular cell color in GridGroupingControl.

Thread ID:

Created:

Updated:

Platform:

Replies:

94537 May 19,2010 07:06 AM May 20,2010 07:54 AM Windows Forms 1
loading
Tags: GridControl
Neha G
Asked On May 19, 2010 07:06 AM

Hi

I tried using this peice of code for changing a particular cell color 1st row 4th column. But it doesnt work.
It behaves like read only.

this.gridGroupingDataView.TableControl.Model[1, 4].TextColor = Color.Red;

CAn u plz help me out.

Jisha Joy [Syncfusion]
Replied On May 20, 2010 07:54 AM

Hi Neha,

In GridGroupingControl you need to handle QueryCellStyleInfo event to set cell styles. Here you could check for indexes and set the styles.

this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);


void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.RowIndex == 4 && e.TableCellIdentity.ColIndex == 2)
{
e.Style.TextColor = Color.PaleGreen;
}
}

Regards,
Jisha

CONFIRMATION

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.

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.

;