Word Wrap in Grid Header

2 posts, 1 answers
  1. Bob
    Bob avatar
    29 posts
    Member since:
    Dec 2014

    Posted 31 Dec 2015 Link to this post

    Is there a way to wrap the Header text in the MVC grid?

     I have tried putting a "\n" (new line) and a CHR(13) (carriage return) in the Title attribute and they don't work. Am i missing something or is it just not possible?



    Bob Mathis

  2. Answer
    Veena avatar
    14 posts
    Member since:
    Oct 2015

    Posted 31 Dec 2015 Link to this post

    Hi Bob,

    If you want to wrap all the headers for all the grid you can try something like this 

    .k-grid-header .k-header {
        overflow: visible !important;
        white-space: normal !important;

    If you want to wrap for just one column, you can try this 

    columns.Bound(p => p.LongHeaderName).Title("LongHeaderName").HeaderHtmlAttributes(new { style = "overflow: visible; white-space: normal" });




Back to Top