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

Alternate Row Banding - Windows Forms DataGrid

What is the best way to color even/odd (or alternating) rows differently, like you would in Quicken?

Preferably, there would be a nice easy method without having to resort to "_PrepareViewStyleInfo" events.

Thanks.


1 Reply

JJ Jisha Joy Syncfusion Team September 28, 2010 09:16 AM UTC

Hi Robert,

You could use the following code to set styles to alternate rows in the grouping grid.

// Applying style settings to alternate rows in the grouping grid.
this.gridGroupingControl1.Appearance.RecordFieldCell.Font.Facename = "Arial Black";
this.gridGroupingControl1.Appearance.RecordFieldCell.Font.Italic = true;
this.gridGroupingControl1.Appearance.RecordFieldCell.Interior = new Syncfusion.Drawing.BrushInfo
(System.Drawing.Color.PaleGoldenrod);

Regards,
Jisha


Loader.
Live Chat Icon For mobile
Up arrow icon