1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    6
    Vote Rating
    0
    nasargus is on a distinguished road

      0  

    Default [RC2] - Grid column width have no effect when using flex:1 as columns default

    [RC2] - Grid column width have no effect when using flex:1 as columns default


    By bad, after clearing cache in browser works fine, please ignore it... sorry

    When columns are defned in defaults as flex, explicitly set width on specific column is ignored.

    Works good in RC1 - one field is 10, secon takes the rest, but both columns are even (flex:1) in RC2

    PHP Code:
     Ext.onReady(function () {
        
    // sample static data for the store
        
    var myData = [
            [
    '3m Co'71.720.020.03'9/1 12:00am'],
            [
    'Alcoa Inc'29.010.421.47'9/1 12:00am']
        ];

        
    // create the data store
        
    var store Ext.create('Ext.data.ArrayStore', {
            
    fields: [{
                
    name'company'
            
    }, {
                
    name'price',
                
    type'float'
            
    }],
            
    datamyData
        
    });

        
    // create the Grid
        
    var grid Ext.create('Ext.grid.Panel', {
            
    storestore,
            
    columns: {
                
    defaults: {
                    
    menuDisabledtrue,
                    
    flex1
                
    },
                
    items: [
                {
                    
    text'Company',
                    
    dataIndex'company'
                
    }, {
                    
    text'Price',
                    
    width10// ignored, both columns are even 
                    
    renderer'usMoney',
                    
    dataIndex'price'
                
    }]
            },
            
    height350,
            
    width600,
            
    title'Array Grid',
            
    renderTo'grid-example'
        
    });
    }); 

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,882
    Vote Rating
    440
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Thanks for updating this post. Glad you were able to get it working.

    Regards,
    Scott.

Thread Participants: 1