Hi Dinis,
Thanks for using Syncfusion products.
If you want to apply the back color for specific buttons, you can use the button indices or also you can use the display text of the specific button. Please refer to below code snippet and let us know if you have any other queries.
Code Example
|
//Event Triggering
gridControl1.DrawCellButtonBackground += GridControl1_DrawCellButtonBackground;
//Event Customization
private void GridControl1_DrawCellButtonBackground(object sender, GridDrawCellButtonBackgroundEventArgs e)
{
if ((e.Style.CellIdentity.RowIndex == 7 && e.Style.CellIdentity.ColIndex == 3)
|| e.Button.Text == "PB2")
{
e.Graphics.FillRectangle(new SolidBrush(Color.Red), e.Bounds);
e.Cancel = true;
}
} |
Please let us know if you have any other queries.
Regards,
Sindhu