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.

GridGroupingControl Change BackColor of Specific Row

Thread ID:

Created:

Updated:

Platform:

Replies:

68923 Oct 5,2007 05:29 AM Oct 6,2007 01:23 AM Windows Forms 2
loading
Tags: GridControl
Arif Eqbal
Asked On October 5, 2007 05:29 AM

Hi,
I have a GridGrouping Control, On Click of a button I want to change the BackColor of a specific Row say RowIndex 2.

haneefm [Syncfusion]
Replied On October 5, 2007 10:47 AM

Hi Arif,

You can try the code like this in the QueryCellStyleInfo event of the GridGroupingControl, to color any specific record(row) in grid.

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.RowIndex == 2)
{
e.Style.Themed = false;
e.Style.BackColor = Color.Pink;
}
}

Thanks for using Syncfusion Products.

Best regards,
Haneef

Arif Eqbal
Replied On October 6, 2007 01:23 AM

Hi Haneef,
Thanks for your reply.
Actually my problem is, I have to change the BackColor when User clicks on a Button on the window. Now I would not have this event fired at that time. So I was looking for some property to access the BackColor of a row.

Thanks
Arif

>Hi Arif,

You can try the code like this in the QueryCellStyleInfo event of the GridGroupingControl, to color any specific record(row) in grid.

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.RowIndex == 2)
{
e.Style.Themed = false;
e.Style.BackColor = Color.Pink;
}
}

Thanks for using Syncfusion Products.

Best regards,
Haneef

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.

;