Change height datagrid header

Posted on 2006-04-22
Last Modified: 2010-04-23

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
Question by:ACAE
    LVL 5

    Expert Comment

     With yourDataGrid
                .Columns(0).HeaderText = "Your  header text" & vbCrLf & "Your header text continued"
      End With
    LVL 5

    Expert Comment

    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
    LVL 5

    Accepted Solution


    Author Comment

    OK, I will think about upgrading to V2

    Thx for your help

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now