Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
how do i put line breaks inside iggrid
posted

my iggrid takes in data that has line breaks but it just shows up as one line. how can I make it multi-line with respect to the line breaks?

Parents
  • 23953
    Suggested Answer
    Offline posted

    Hello Jessica,

    The grid data is rendered as pure HTML, so you'll need to use <br/> tag instead of line breaks.

    One way to achieve this is to use column formatter function and replace the "\n" character with "<br/>".

    Here is an example code:

    formatter: function(val) {
    return val.replace(/\n/g, "<br/>");
    }

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc. 

Reply Children