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. Image for the cookie policy date

PushButton coloring

Hi, How can I change the back color and text color for a cell with CellType="PushButton"? Thanks a lot! Eric

1 Reply

AD Administrator Syncfusion Team May 12, 2005 09:17 AM UTC

You can try handling the DrawCellButtonBackground event.
private void gridControl1_DrawCellButtonBackground(object sender, GridDrawCellButtonBackgroundEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(cc.RowIndex == 2 && cc.ColIndex == 3)
	{
		e.Graphics.FillRectangle(Brushes.Red, e.Bounds);
		e.Cancel = true;
	}
}

Loader.
Up arrow icon