How to display Header Text on two lines

5 posts, 0 answers
  1. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 01 Jun 2009 Link to this post

    Hi All,

    In order to save space and for information purposes I am trying to display a column header text in two lines if possible like:

    ($ per day)

    Is there a suitable way to do this?



  2. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 01 Jun 2009 Link to this post

    meanwhile, found the answer. It seems the "/n" does not work in this case and the environment.newline has to be used instead, as gridview1.columns(0).headertext="first line" & environment.newline & "second line"

    Cheers all,

  3. Martin Vasilev
    Martin Vasilev avatar
    1061 posts

    Posted 04 Jun 2009 Link to this post

    Hi George,

    Thank you for writing. "\n" does not work because in VB.Net it is an escape sequence. You have already find the right way to add the new line. You could use the following code, too:
    Me.radGridView1.Columns(0).HeaderText = "First Line " & vbLf & "Second Line"   
    DirectCast(Me.radGridView1.GridElement, GridTableElement).TableHeaderHeight = 40  

    Do not hesitate to contact me again if you have other questions.

    All the best,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Ram
    Ram avatar
    97 posts
    Member since:
    Jun 2011

    Posted 09 Nov 2011 Link to this post

    I too have same requirement.
    I tried like this in Init event
    But second word is overlaping the first one even though I set the headerstyle height more.

    callogGrd.Columns[7].HeaderText =


    I tried by placing \n also but same result.
    can any one help me on this asap


  5. Svett
    Svett avatar
    728 posts

    Posted 11 Nov 2011 Link to this post

    Hi Ram,

    You should ask all question related to ASP.NET AJAX Controls in the corresponding forum section, which is observed by the ASP.NET AJAX support guys.

    Kind regards,
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Back to Top