Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Change background color of columns in a DataGrid

I can change the background color when a cell in a certain column is selected, but otherwise the background color is the same. As far as I can tell, I'll have to override the OnPaint method to change the background color of certain columns. Is this correct? This is a Windows Form application.

tim
Monday, May 23, 2005

Its one of the things I'm hoping the new grid in 2005 fixes but I haven't checked into it yet.

CharlesC
Monday, May 23, 2005

Charles,

Correct you need to overide the OnPaint method. A good example of this is located at;

http://www.syncfusion.com/faq/winforms/search/745.asp

Hope this helps,

Brendan.

Brendan Barber
Wednesday, May 25, 2005

*  Recent Topics

*  Fog Creek Home