How to implement wordwrap on jqGrid that works on IE7, IE8 and FF

How to implement wordwrap on jqGrid, which works on IE7, IE8 and FF, and also works with resizing a column (grid alignment correctly).

Tried to index the content on each td using a div of a certain width (based on the initial TH width), but colresize will not work with the div I entered. jqGrid calculates the resized width TH and neighboring THs.

Is there a better solution that avoids all the "hacks" of JavaScript?

+9
css resize word-wrap jqgrid
Jun 08 '10 at 2:00
source share
3 answers

jqGrid Text / Word Wrapping explains how to do this using the following CSS:

.ui-jqgrid tr.jqgrow td { white-space: normal !important; height:auto; vertical-align:text-top; padding-top:2px; } 
+19
Jun 09 '10 at 13:19
source share

Use this css, this will certainly help.

  .ui-jqgrid tr.jqgrow td { word-wrap: break-word; /* IE 5.5+ and CSS3 */ white-space: pre-wrap; /* CSS3 */ white-space: normal !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ overflow: hidden; height: auto; vertical-align: middle; padding-top: 3px; padding-bottom: 3px } 
+1
May 03 '13 at 10:13
source share

Cancel all

this may be as follows:

  $("#jqxgrid").jqxGrid( { source: dataAdapter, width: 1500, autorowheight: true, autoheight: true, columnsresize: true, theme: 'ui-redmond', 
-one
Jun 11 '14 at 10:04 on
source share



All Articles