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

Change the backcolor

Thread ID:





6012 Jul 28,2003 10:55 PM UTC Jul 29,2003 05:48 AM UTC WinForms 1
Tags: GridControl
Asked On July 28, 2003 10:55 PM UTC

I have several cell, each has its PatternStyle or GradientStyle. How can I change their backcolor and keep their PatternStyle/GradientStyle unchanged.

Administrator [Syncfusion]
Replied On July 29, 2003 05:48 AM UTC

BrushInfo brInfo = this.gridControl1[2,2].Interior; this.gridControl1[2,2].Interior = new BrushInfo(brInfo.GradientStyle, Color.FromArgb(255, 225, 225), Color.FromArgb(155, 125, 125)); will change the color of a cell, but keep the same GradientStyle. If each of your cells can have a different GradientStyle or different new colors, then you would have to do things cell by cell. If a ranges shared the same ultimate GradientStyle and colors, then you could use grid.ChangeCells to change the range.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon