[转载]winform中改变DataGridview的列标题字体颜色

http://jclhy.bokee.com/viewdiary.41216892.html

DataGridViewCellStyle style = new DataGridViewCellStyle();
            style.ForeColor = Color.Red;
            foreach (DataGridViewColumn col in this.dataGridView1.Columns)
            {
                col.HeaderCell.Style = style;
            }
            this.dataGridView1.EnableHeadersVisualStyles = false;  //<----

posted @ 2010-06-24 14:33  OneIsYou  阅读(6183)  评论(0编辑  收藏  举报