View Full Version : how do you set the height of a row in a grid?

6 Mar 2008, 8:58 AM
I cant set the height of a row in a grid, my text gets hidden so i have to expand the columns to view rest of cell data

I deally i want the text to wrap in the cell so the cell height/row increases?

6 Mar 2008, 12:28 PM
I did it by using firbug to see the apllied css and then making the changes needed to the css

6 Mar 2008, 2:41 PM
You can also set the viewConfig of your grid like this:

viewConfig: {
getRowClass : function(record, rowIndex, p, store){
p.body = '<p style="color:red;">Write here write here Write here write here Write here write here Write here write here Write here write here </p>';
return 'x-grid3-row-expanded';
return 'x-grid3-row-collapsed';

With getRowClass function you can create a body for your row, but I'm not sure it is what you want, but get it a try :-)

7 Mar 2008, 1:22 AM
What i want to do is display the contents of my cell. So it wraps in the cell. At the moment i have to manually drag and extent my column. I want it to auto wrap into the fixed defined width of my column definition.

something like height of row is auto......can anyone help?

7 Mar 2008, 1:42 AM
Give the column you want to wrap an ID:


Then define CSS classes like this:

td.x-grid3-td-<your id> {
overflow: hidden;
td.x-grid3-td-<your id> div.x-grid3-cell-inner {
white-space: normal;

7 Mar 2008, 1:56 AM
Thank you animal!!
Works great!

7 Mar 2008, 2:11 AM

this works but i need to apply this to every column, thirteen.

Each column has a id, thats 13 css definitions, is there a better way i can do this?

sorry my css is a bit weak?

7 Mar 2008, 2:42 AM
Just apply it to the basic td class in your grid then. You need to learn how to use CSS to do your job properly.

9 Mar 2008, 8:11 AM
This doesn't seems to work for me. Is it the same in ext 2.0?

9 Mar 2008, 8:55 AM
Show us your code that doesn't work. Javascript and CSS. In code tags.