PDA

View Full Version : Text wrap in cells



awatkins
10 Dec 2006, 1:01 AM
I've done my due dilligence by searching the site and documentation for over 2 hours. I can't find reference to if the Grid supports text wrapping in columns. Someone asked the question in one thread, but there was no response. Someone also mentioned wanting to set rowSpan and I believe Jack told them columns were absolutely positioned, which may then imply it's not supported out the box. I want to make sure though. Thanks for your help and if you're reading Jack, great job.

jack.slocum
10 Dec 2006, 6:00 AM
It's not supported by default. There is this thread on it, but it may take some tweaking.

http://www.yui-ext.com/forum/viewtopic.php?t=90

cubi
27 Feb 2008, 1:55 AM
I am interested in text wrap in cell of gripPanel but link is died:
http://www.yui-ext.com/forum/viewtopic.php?t=90[/QUOTE]
Can you post more information about it?
thanks very much.

cocinerox
27 Feb 2008, 2:05 AM
Hi, try this:


<style type="text/css">
.x-grid3-cell-inner, .x-grid3-hd-inner { white-space:normal !important; }
</style>

diannes
28 Aug 2008, 6:30 PM
cocinerox, you're a genius.... THANK YOU!!!!!

cocinerox
29 Aug 2008, 10:57 AM
Oh, don't mention it... :">

baskar
28 Apr 2009, 9:56 PM
Hi

i am new in extjs,
I having some trouble displaying a cell over multiple lines, I've tried adding a css
attribute white-space:normal but still no luck, any pointers?

Thanks


Ext.onReady(function() {

var myData = [['001','This is my database value
how can i display the data in my grid cell
canyou help me']];

var myReader = new Ext.data.ArrayReader({}, [
{name: 'ID'},
{name: 'Advertisement'}

]);

var grid = new Ext.grid.GridPanel({
store: new Ext.data.Store({
data: myData,
reader: myReader,
collapsible: true
}),

I'm Using this CSS:

<style type="text/css">
.x-grid3-cell-inner, .x-grid3-hd-inner { white-space:normal !important; }
</style>


columns: [{header: 'ID', width: 20, sortable: true, dataIndex: 'ID'},
{header: 'Advertisement', id:'x-grid3-cell-inner', width: 100, sortable: true, dataIndex: 'Advertisement'}
],
viewConfig: {
forceFit: true,
autoFill : true
},
renderTo: 'dgrid',
title: 'Syslog Management',
width: 700,
enableRowHeightSync: true,
frame: true,
id: 'grid'
});

grid.getSelectionModel().selectFirstRow();
});

baskar
28 Apr 2009, 10:32 PM
Hi

i am new in extjs,

I having some trouble displaying a cell over multiple lines, I've tried adding a css
attribute white-space:normal but still no luck, any pointers?

Thanks


Ext.onReady(function() {

var myData = [['001','This is my database value
how can i display the data in my grid cell
canyou help me']];

var myReader = new Ext.data.ArrayReader({}, [
{name: 'ID'},
{name: 'Advertisement'}

]);

var grid = new Ext.grid.GridPanel({
store: new Ext.data.Store({
data: myData,
reader: myReader,
collapsible: true
}),

I'm Using this CSS:
<style type="text/css">
.x-grid3-cell-inner, .x-grid3-hd-inner { white-space:normal !important; }
</style>

"The Grid Header is take the multiline text value, But the grid inside row cell not take the multiline text value "


columns: [{header: 'ID', width: 20, sortable: true, dataIndex: 'ID'},
{header: 'Advertisement', id:'x-grid3-cell-inner',width: 100, sortable: true, dataIndex: 'Advertisement'}
],
viewConfig: {
forceFit: true,
autoFill : true
},
renderTo: 'dgrid',
title: 'Syslog Management',
width: 700,
enableRowHeightSync: true,
frame: true,
id: 'grid'
});

grid.getSelectionModel().selectFirstRow();
});


Please help me

tryanDLS
29 Apr 2009, 6:58 AM
@baskar - stop posting the same question in multiple places. Read this http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly