Results 1 to 9 of 9

Thread: Error with header columns (fit layout)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User semialcruz's Avatar
    Join Date
    May 2010
    Location
    Chapinlandia
    Posts
    12

    Default Answered: Error with header columns (fit layout)

    I have a form panel with a grid inside, but the header of the columns are not fitted into it. I've tried this on Chrome, IE9 and FF and getting the same error.

    print.jpg

    This is the code of my grid panel:

    Code:
    var gridPanel = Ext.create('Ext.grid.Panel', {
        flex: 0.60,
        store: store,
        id: 'store-form',
        title: 'Datos de Cotizaciones',
        layout: 'fit',
        columns: [{
            text: 'Codigo',
            flex: 0.10,
            sortable: true,
            dataIndex: 'code',
            align: 'left'
        }, {
            text: 'Tienda',
            flex: 0.45,
            sortable: true,
            dataIndex: 'stores',
            align: 'left',
            id: 'stores'
        }, {
            text: 'Abiertas',
            flex: 0.15,
            sortable: true,
            dataIndex: 'opened',
            align: 'right',
            renderer: function (val) {
                return '<span style="color:#ff0000;">' + val + '</span>';
            }
        }, {
            text: 'Cerradas',
            flex: 0.15,
            sortable: true,
            dataIndex: 'closed',
            align: 'right',
            renderer: function (val) {
                return '<span style="color:#318021;">' + val + '</span>';
            }
        }, {
            text: 'Total Cotizaciones',
            flex: 0.15,
            sortable: true,
            dataIndex: 'quotes',
            align: 'right'
        }],
        listeners: {
            selectionchange: function (model, records) {
                var json, name, i, l, items, series, fields;
                if (records[0]) {
                    rec = records[0];
                    form = form || this.up('form').getForm();
                    fields = form.getFields();
                    fields.each(function (field) {
                        field.suspendEvents();
                    });
                    form.loadRecord(rec);
                    updateRecord(rec);
                    fields.each(function (field) {
                        field.resumeEvents();
                    });
                }
            }
        }
    });
    Thanks in advance for any help!

    P.D. Sorry for my bad english

  2. Exactly which ExtJS version are you using?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •