View Full Version : problem with viewconfig

3 Nov 2009, 8:15 AM
Hi all, I have a question, how can I align the viewconfig of my grid to the second column, because, ever start from the border of the grid , but I want that starts from the second column, o thrid column, can anybody help me, please?

here is my code

viewConfig: {
forceFit: true,
enableRowBody: true,
showPreview: true,
getRowClass : function(record, rowIndex, p, store){
p.body = '<p><span style="font-size: 8pt; color: Navy; font-family: Verdana; font-weight: bold;">' + record.data.Name + '</span></p>';
return 'x-grid3-row-expanded';
return 'x-grid3-row-collapsed';

the images explain better i think:P

3 Nov 2009, 9:03 AM
You can use a renderer for the second column with a <BR/> but you'll be limited to that column width. The row body doesn't have any relation with the columns so doing what you mean is difficult.

3 Nov 2009, 9:52 AM
thank's for your answer uniring, but no works , just only aggregate an enter , a jump of line (sorry for my english)

3 Nov 2009, 11:39 AM
I mean no using a row body to make this, simply a column renderer in your column model as this:

function renderTrabajo(value,p,rec) {
return value+'<br/>'+rec.data.Name;


var cm = new Ext.grid.ColumnModel([
header: 'Trabajo',
dataIndex: 'trabajo',
renderer: renderTrabajo

If you need to explain something in spanish I can understand you, but I don't know if the politics of the forum allow this.

3 Nov 2009, 12:41 PM
Oh!! thank's buddy, of course I'd like to listen your explanation, maybe could I send MP?

3 Nov 2009, 2:03 PM
well, I've got a question, if I understand, you say that put one under other about the descriptions for example, and depending of the width of the column, isn't it?

in other words(si se puede poner un viewconfig debajo de otro, y que tbn este dependiendo del ancho de la columna, no es asi?)

Using '<BR>', my question is about 'value', how works that?

3 Nov 2009, 2:55 PM
OO!, I could it understand, so if the string is very long, not can show it because depend of the column's width, but so how can I show all the string??, is possible?