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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how can i change a particular cell color in GridGroupingControl.

Thread ID:

Created:

Updated:

Platform:

Replies:

94537 May 19,2010 11:06 AM UTC May 20,2010 11:54 AM UTC WinForms 1
loading
Tags: GridControl
Neha G
Asked On May 19, 2010 11:06 AM UTC

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 11:54 AM UTC

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.

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

;