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

set color currentcell

Thread ID:





28817 May 11,2005 08:53 AM UTC May 11,2005 08:39 PM UTC WinForms 1
Tags: GridControl
Asked On May 11, 2005 08:53 AM UTC

Hello, I''m not able to understand how can I set the color (background) of the cell currently selected. Someone can help me? Many thanks Nick

Administrator [Syncfusion]
Replied On May 11, 2005 08:39 PM UTC

Try setting the backcolor of the currentcell by handling the PrepareViewStyleInfo event, and if the eventargs point to the currentcell, set the e.Style.Backcolor property.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	if(e.RowIndex == cc.RowIndex && e.ColIndex == cc.ColIndex)
		e.Style.BackColor = Color.Red;


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