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.
Unfortunately, activation email could not send to your email. Please try again.

cell textbox backcolor

Thread ID:





6225 Aug 5,2003 12:47 PM Aug 5,2003 05:45 PM Windows Forms 1
Tags: GridControl
Terry Foster
Asked On August 5, 2003 12:47 PM

I am alternating row colors in a GridControl by setting the style.Interior property in the PrepareViewStyleInfo event. However, when a in-cell textbox becomes active, the backcolor of the text box is the same as the row backcolor when I'd like it be SystemColor.Window, like all other textboxes normally are. How can I do this? Terry

Administrator [Syncfusion]
Replied On August 5, 2003 05:45 PM

You can try setting the backcolor in the CurrentCell in PrepareViewStyleInfo.
private void gridControl1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
	if((e.RowIndex % 2) == 1)
		e.Style.BackColor = Color.LightGoldenrodYellow;

	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(cc.RowIndex == e.RowIndex && cc.ColIndex == e.ColIndex)
		e.Style.BackColor = Color.White;


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.

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.