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 to Change the Backcolor of a Single Row in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

39099 Dec 27,2005 07:00 AM Dec 28,2005 12:46 AM Windows Forms 1
loading
Tags: GridControl
Andrey Klimovskiy
Asked On December 27, 2005 07:00 AM

How to Change the Backcolor of a Single Row in GridGroupingControl? "_grid.TableModel.RowStyles[2].BackColor = System.Drawing.Color.Yellow;" - Doesn''t work!

stanleyj [Syncfusion]
Replied On December 28, 2005 12:46 AM

Hi Andrey, You will have to handle TableControlPrepareViewStyleInfo or QueryCellStyleInfo handler to change the backcolor of single row. private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e) { GridTableCellStyleInfo style = (GridTableCellStyleInfo) e.Inner.Style; if (style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell) if(e.TableControl.TableDescriptor.Name == "TableName" && e.Inner.RowIndex == 5) e.Inner.Style.BackColor = Color.Salmon; } Best regards, Stanley

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.

;