The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How to Change the Backcolor of a Single Row in GridGroupingControl?
"_grid.TableModel.RowStyles[2].BackColor = System.Drawing.Color.Yellow;" - Doesn''t work!
STstanleyj Syncfusion Team December 28, 2005 05:46 AM UTC
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