You found a bug! We've classified it as EXTJS-8808 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    77
    Vote Rating
    2
    pscanlon1 is on a distinguished road

      0  

    Default Editor grid does not work with Locked Columns

    Editor grid does not work with Locked Columns


    Take the editor grid example... Which actually doesnt work with the links for 4.2, but its under
    /examples/grid/cell-editing.js

    Make the first column a locked column...and have at it. Note that this WORKED as of the previous release.

    Here is the entire js file.

    Code:
    Ext.Loader.setConfig({    enabled: true});Ext.Loader.setPath('Ext.ux', '../ux');Ext.require([    'Ext.selection.CellModel',    'Ext.grid.*',    'Ext.data.*',    'Ext.util.*',    'Ext.state.*',    'Ext.form.*',    'Ext.ux.CheckColumn']);Ext.onReady(function() {    Ext.QuickTips.init();     function formatDate(value){        return value ? Ext.Date.dateFormat(value, 'M d, Y') : '';    }    Ext.define('Plant', {        extend: 'Ext.data.Model',        fields: [            // the 'name' below matches the tag name to read, except 'availDate'            // which is mapped to the tag 'availability'            {name: 'common', type: 'string'},            {name: 'botanical', type: 'string'},            {name: 'light'},            {name: 'price', type: 'float'},            // dates can be automatically converted by specifying dateFormat            {name: 'availDate', mapping: 'availability', type: 'date', dateFormat: 'm/d/Y'},            {name: 'indoor', type: 'bool'}        ]    });    // create the Data Store    var store = Ext.create('Ext.data.Store', {        // destroy the store if the grid is destroyed        autoDestroy: true,        model: 'Plant',        proxy: {            type: 'ajax',            // load remote data using HTTP            url: 'plants.xml',            // specify a XmlReader (coincides with the XML format of the returned data)            reader: {                type: 'xml',                // records will have a 'plant' tag                record: 'plant'            }        },        sorters: [{            property: 'common',            direction:'ASC'        }]    });    var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {        clicksToEdit: 1    });    // create the grid and specify what field you want    // to use for the editor at each header.    var grid = Ext.create('Ext.grid.Panel', {        store: store,        columns: [{            id: 'common',            header: 'Common Name',            dataIndex: 'common',            flex: 1,            locked:true,            editor: {                allowBlank: false            }        }, {            header: 'Light',            locked: true,            dataIndex: 'light',            width: 130,            editor: new Ext.form.field.ComboBox({                typeAhead: true,                triggerAction: 'all',                selectOnTab: true,                store: [                    ['Shade','Shade'],                    ['Mostly Shady','Mostly Shady'],                    ['Sun or Shade','Sun or Shade'],                    ['Mostly Sunny','Mostly Sunny'],                    ['Sunny','Sunny']                ],                lazyRender: true,                listClass: 'x-combo-list-small'            })        }, {            header: 'Price',            dataIndex: 'price',            width: 70,            align: 'right',            renderer: 'usMoney',            editor: {                xtype: 'numberfield',                allowBlank: false,                minValue: 0,                maxValue: 100000            }        }, {            header: 'Available',            dataIndex: 'availDate',            width: 95,            renderer: formatDate,            editor: {                xtype: 'datefield',                format: 'm/d/y',                minValue: '01/01/06',                disabledDays: [0, 6],                disabledDaysText: 'Plants are not available on the weekends'            }        }, {            xtype: 'checkcolumn',            header: 'Indoor?',            dataIndex: 'indoor',            width: 55,            stopSelection: false        }, {            xtype: 'actioncolumn',            width:30,            sortable: false,            items: [{                icon: '../shared/icons/fam/delete.gif',                tooltip: 'Delete Plant',                handler: function(grid, rowIndex, colIndex) {                    store.removeAt(rowIndex);                 }            }]        }],        selModel: {            selType: 'cellmodel'        },        renderTo: 'editor-grid',        width: 600,        height: 300,        title: 'Edit Plants?',        frame: true,        tbar: [{            text: 'Add Plant',            handler : function(){                // Create a model instance                var r = Ext.create('Plant', {                    common: 'New Plant 1',                    light: 'Mostly Shady',                    price: 0,                    availDate: Ext.Date.clearTime(new Date()),                    indoor: false                });                store.insert(0, r);                cellEditing.startEditByPosition({row: 0, column: 0});            }        }],        plugins: [cellEditing]    });    // manually trigger the data store load    store.load({        // store loading is asynchronous, use a load listener or callback to handle results        callback: function(){            Ext.Msg.show({                title: 'Store Load Callback',                msg: 'store was loaded, data available for processing',                modal: true,                icon: Ext.Msg.INFO,                buttons: Ext.Msg.OK            });        }    });});

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    853
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,346
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    I don't see this issue here - http://cdn.sencha.com/ext/beta/4.2.0...ting-grid.html

    With what link are you seeing this problem?
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

Thread Participants: 2