DataGridViewCellStyle headerStyle = new DataGridViewCellStyle();
headerStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridView1.ColumnHeadersDefaultCellStyle = headerStyle;
DataGridViewCellStyle headerStyle = new DataGridViewCellStyle();
headerStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridView1.ColumnHeadersDefaultCellStyle = headerStyle;