• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • 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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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