PDA

View Full Version : Text wrap in grid cells not works in IE.



anpegar
16 Mar 2011, 12:51 AM
Hi, I used this style for wrap text in cell grid but works fine in Firefox and not work in IE, Why?
The viewconfig of grid is {forceFit:true}

function columnWrap(val){
return '<div style="white-space:normal !important;">'+ val +'</div>';
}

new Ext.grid.GridPanel({
[...],
columns:[{
id: 'someID',
header: "someHeader",
dataIndex: 'someID',
hidden: false,
sortable: true,
renderer: columnWrap
}]

In IE:

25159

In Firefox:

25160

fay
16 Mar 2011, 2:47 AM
Try;



function columnWrap(value, metaData, record, rowIndex, colIndex, store)
{
metaData.attr = 'style="white-space:normal !important;"';
return value;
}

anpegar
16 Mar 2011, 2:56 AM
Works fine !!
Thank you very much for your help.