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

Setting a cell pattern?

Hi, I'm trying to set the pattern for a cell, but I get compile errors on PatternStyle and ForeColor as they are Read Only properties of the BrushInfo. My code is: this.gridControl[1,1].Interior.PatternStyle = PatternStyle.Horizontal; Can you please tell me what I'm doing wrong. Thanks. Sue

1 Reply

AD Administrator Syncfusion Team April 28, 2003 01:23 AM

You need to create a new brush object with the desired properties. gridControl1[1,1].Interior = new BrushInfo(PatternStyle.Horizontal, Color.Red, Color.White); The Samples\Quick Start\CellStyles has some additionnal sample code.

Loader.
Live Chat Icon For mobile
Up arrow icon