Results 1 to 4 of 4

Thread: [4.1b2] CellEditing is confused by complex cell content

Threaded View

Previous Post Previous Post   Next Post Next Post
    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2007
    Posts
    114
    Vote Rating
    4
      0  

    Default [4.1b2] CellEditing is confused by complex cell content

    In this example, the editor doesn't occupy the entire cell. It seems to be related to the renderer producing other than plain text.

    Code:
    Ext.onReady(function() {
        Ext.create('Ext.data.Store', {
            storeId:'simpsonsStore',
            fields:['name', 'email'],
            data:{'items':[
                { 'name': 'Marge', "email":"marge@simpsons.com" }
            ]},
            proxy: {
                type: 'memory',
                reader: {
                    type: 'json',
                    root: 'items'
                }
            }
        });
    
        Ext.create('Ext.grid.Panel', {
            title: 'Simpsons',
            store: Ext.data.StoreManager.lookup('simpsonsStore'),
            plugins: [
                Ext.create('Ext.grid.plugin.CellEditing', {
                    clicksToEdit: 1
                })
            ],
            columns: [{
                    header: 'Name',
                    dataIndex: 'name',
                    field: new Ext.form.TextField({
                        allowBlank: false
                    })
                }, {
                    header: 'Email',
                    dataIndex: 'email',
                    flex: 1,
                    field: new Ext.form.TextField({
                        allowBlank: false
                    }),
                    renderer: function(value) {
                        return "<span>" + value + "</span>";
                    }
                }
            ],
            width: 400,
            renderTo: Ext.getBody()
        });
    
    });
    Attached Images Attached Images

Posting Permissions

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