Showing posts with label Alignment. Show all posts
Showing posts with label Alignment. Show all posts

Tuesday, February 24, 2009

Visual Studios 2008 - DataGridView Center Heading

Problem: Want to center the text in the header of a DataGridView.

Answer:

this.dataGridView1.ColumnHeadersDefaultCellStyle.Alignment =
DataGridViewContentAlignment.BottomCenter;