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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PushButton coloring

Thread ID:





28889 May 12,2005 02:37 AM UTC May 12,2005 09:17 AM UTC WinForms 1
Tags: GridControl
Eric Luk
Asked On May 12, 2005 02:37 AM UTC

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

Administrator [Syncfusion]
Replied On 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;


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon