Ext


Go Back   Ext JS Forums > Ext JS Community Forums (3.0) > Ext: Help

Reply
 
Thread Tools
  #1  
Old 11-03-2009, 11:15 AM
andryi andryi is offline
Ext User
 
Join Date: Jul 2009
Posts: 67
andryi is on a distinguished road
Default problem with viewconfig

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){
                if(this.showPreview){
                    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
Attached Images
File Type: jpg number1.jpg (21.6 KB, 10 views)
File Type: jpg number2.jpg (21.8 KB, 11 views)
Reply With Quote
  #2  
Old 11-03-2009, 12:03 PM
uniring's Avatar
uniring uniring is offline
Ext User
 
Join Date: Mar 2009
Posts: 36
uniring is on a distinguished road
Default

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.
__________________
Project manager / coder @ xDesk ERP
Reply With Quote
  #3  
Old 11-03-2009, 12:52 PM
andryi andryi is offline
Ext User
 
Join Date: Jul 2009
Posts: 67
andryi is on a distinguished road
Default

thank's for your answer uniring, but no works , just only aggregate an enter , a jump of line (sorry for my english)
Reply With Quote
  #4  
Old 11-03-2009, 02:39 PM
uniring's Avatar
uniring uniring is offline
Ext User
 
Join Date: Mar 2009
Posts: 36
uniring is on a distinguished road
Default

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.
__________________
Project manager / coder @ xDesk ERP
Reply With Quote
  #5  
Old 11-03-2009, 03:41 PM
andryi andryi is offline
Ext User
 
Join Date: Jul 2009
Posts: 67
andryi is on a distinguished road
Default

Oh!! thank's buddy, of course I'd like to listen your explanation, maybe could I send MP?
Reply With Quote
  #6  
Old 11-03-2009, 05:03 PM
andryi andryi is offline
Ext User
 
Join Date: Jul 2009
Posts: 67
andryi is on a distinguished road
Default

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?
Reply With Quote
  #7  
Old 11-03-2009, 05:55 PM
andryi andryi is offline
Ext User
 
Join Date: Jul 2009
Posts: 67
andryi is on a distinguished road
Default

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?
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 03:55 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.