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 05:23 AM UTC

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.
Up arrow icon