I have a jqGrid table. When it is loaded with data table width becomes larger and I have large width columns.
I do not want table's width changes and I want fixed size columns with wrapping property (if value exceeds column width it should be broken and should be continued at new line). How can I do that?
I tried that CSS:
<style type="text/css">
.ui-jqgrid tr.jqgrow td {
word-wrap: break-word; /* IE 5.5+ and CSS3 */
white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* 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;
}
</style>
and I use that:
tableToGrid("#tableId",{caption:"cap",shrinkToFit:false, autowidth:true})
However table's size is bigger than its parent and also every component of my HTML page?
EDIT: I have found that I override white-space
property of jqGrid but ie does not works properly. When I debug the CSS I get that:
as you see white-space
is overriden. When I explicitly uncheck the white-space
property of jqGrid as follows:
it works as expected for me.