PDA

View Full Version : ShrinkWrap property of the grid column



vvorobeychik
4 Jun 2013, 6:58 AM
I need the text, if it is too long, to be wrapped in the grid column. I can do that using renderer property with the code below

{..., renderer:WrapText}
function WrapText(value)
{
return '<table><tr><td>' + value + '</td></tr></table>';
}
This approach has a drawback: the font size does not match the font size of other columns. Artificially I can use
<font size=-1>value</font> inside the "<td>" tag.

I tried the shrinkWrap configuration option with each value described in the documentation. It does not have any effect on the column behavior. I tried to set shrinkWrap config option on the grid itself, no any effect.

What do I miss please?

vvorobeychik
4 Jun 2013, 10:51 AM
I found the way around:


function WrapText(value, metaData, rec)
{
return '<div style="white-space:normal">' + value + '</div>';
}


But still I don't understand why shrinkWrap does not work.