Link to home
Start Free TrialLog in
Avatar of ACAE
ACAE

asked on

Change height datagrid header

Hello,

In my windows application I have a datagrid (inherited from std datagrid) which has columns with long titles. I would like to change the height of the column header, and display the header text in 2 lines so the user can see the full text.
How can I do this.

Thx for your help
Avatar of maralans
maralans

 With yourDataGrid
            .Columns(0).HeaderText = "Your  header text" & vbCrLf & "Your header text continued"
  End With
You can also set your alignment, colors, and fonts this way:

With dgFlag.ColumnHeadersDefaultCellStyle
            .BackColor = Color.Navy
            .ForeColor = Color.White
            .Font = New Font(dgFlag.Font, FontStyle.Bold)
            .Alignment = HorizontalAlignment.Left
End With
ASKER CERTIFIED SOLUTION
Avatar of maralans
maralans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ACAE

ASKER

OK, I will think about upgrading to V2

Thx for your help