Word-wrap grid cells in Ext JS

If you only want to apply the wrapping to one column, you can add a custom renderer.

Here is the function to add:

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

Then add the renderer: columnWrap to each column you want to wrap

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)