Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# datagridview set column header alignment

foreach(DataGridViewColumn col in dgvBreakDowns.Columns)
{
    col.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
    col.HeaderCell.Style.Font = new Font("Arial", 12F, FontStyle.Bold, GraphicsUnit.Pixel);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #datagridview #set #column #header #alignment
ADD COMMENT
Topic
Name
7+1 =