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

Change the backcolor

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

1 Reply

AD Administrator Syncfusion Team 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.

Live Chat Icon For mobile
Up arrow icon