• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

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
0
ACAE
Asked:
ACAE
  • 3
1 Solution
 
maralansCommented:
 With yourDataGrid
            .Columns(0).HeaderText = "Your  header text" & vbCrLf & "Your header text continued"
  End With
0
 
maralansCommented:
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
0
 
ACAEAuthor Commented:
OK, I will think about upgrading to V2

Thx for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now