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.
Hi
I am trying to change the cell back color in
CellDrawn Event using the following code.
if(e.RowIndex > 0)
{
e.Style.BackColor = Color.Red;
}
else
{
e.Style.BackColor = Color.BurlyWood;
}
Its not changing the color
any suggestion are appreciated
Thanks
Gulshan
ADAdministrator Syncfusion Team June 8, 2004 08:50 PM UTC
The CellDrawn event occurs AFTER the cell is drawn. So, trying to set the backcolor there will not do anything.
Instead, use the PrepareViewStyleInfo event, and set the bckColor there using similar code.
GKGulshan KheraJune 8, 2004 09:02 PM UTC
Got the point
Thanks Clay
>The CellDrawn event occurs AFTER the cell is drawn. So, trying to set the backcolor there will not do anything.
>
>Instead, use the PrepareViewStyleInfo event, and set the bckColor there using similar code.