beakersoft beakersoft - 1 year ago 131
jQuery Question

Wrapping Text lines in JqGrid

Can you get lines of text to wrap in

? I have had a look round but i can't find anything.

Answer Source

Try the following CSS:

    .ui-jqgrid tr.jqgrow td {
        white-space: normal !important;

This works for me using jqGrid 3.6.

As N30 pointed out, jqGrid 4.0 supports a cellattr colmodel option which can allow for a finer grain of control over text wrapping. From his example:

cellattr: function (rowId, tv, rawObject, cm, rdata) { 
            return 'style="white-space: normal;' 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download