Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8790331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:37:19+00:00 2026-06-13T22:37:19+00:00

I got a problem on Ext 4.1.0 and Ext 4.1.1 Double click first cell

  • 0

I got a problem on Ext 4.1.0 and Ext 4.1.1

Double click first cell to edit it and then click window close button, the editor still floats on the page.But it is ok for last cell.

Anyone met this problem before? Thanks

Ext.onReady(function(){

    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name', 'email', 'phone'],
        data:{'items':[
            { 'name': 'Lisa',  "email":"lisa@simpsons.com",  "phone":"1224" },
            { 'name': 'Bart',  "email":"bart@simpsons.com",  "phone":"1234" },
            { 'name': 'Homer', "email":"home@simpsons.com",  "phone":"1244" },
            { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"1254" }
        ]},
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });

    var table = Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [
            { 
                text: 'Name',  
                dataIndex: 'name',
                editor: { xtype: 'textfield', toFrontOnShow: false } 
            },
            { 
                text: 'Email', 
                dataIndex: 'email', 
                flex: 1 
            },
            { 
                text: 'Phone', 
                dataIndex: 'phone',
                editor: { 
                    xtype: 'numberfield', 
                    hideTrigger: true, 
                    validateOnChange : false
                } 
            }
        ],
        height: 200,
        width: 400,
        plugins:[ Ext.create('Ext.grid.plugin.CellEditing', {
            clicksToEdit: 2
        })]
    });

    var window = new Ext.Window({
        id: 'abc',
        title :'abc',
        modal : true,
        layout: 'border',
        resizable : true,
        draggable : true,
        closable : true,
        closeAction : 'hide',
        width :410,
        height :210,
        items : [table]
      });

    window.show();

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:37:20+00:00Added an answer on June 13, 2026 at 10:37 pm

    The easiest way to handle this for you, would be to listen to the window’s beforeclose event and cancel any editing in this event using the celleditor’s cancelEdit method as described here in the docs.

    For example, here is your window object (from your code above) with the listener applied:

    var window = new Ext.Window({
        id: 'abc',
        title :'abc',
        modal : true,
        layout: 'border',
        resizable : true,
        draggable : true,
        closable : true,
        closeAction : 'hide',
        width :410,
        height :210,
        items : [ table],
        // add this listener to your window
        listeners: {
            beforeclose: function(panel) {
                var view = panel.down('gridview');
    
                if (view && view.editingPlugin) {
                    view.editingPlugin.cancelEdit();
                }
            }
        }
    });
    

    Reply to comment:

    Here’s an override that would do the same thing. You would have to include this override in each app after ExtJS initialization though.

    Of course it is also possible to replace the init function in the Ext.grid.plugin.Editor source code with this one (then you wouldn’t have to include the override in the app) but I wouldn’t recommend doing that for a number of reasons.

    Ext.override(Ext.grid.plugin.Editor, {
        init: function(grid) {
    
            // the normal init code (below) must be included in the override
            var me = this;
            me.grid = grid;
            me.view = grid.view;
            me.initEvents();
            me.mon(grid, 'reconfigure', me.onReconfigure, me);
            me.onReconfigure();
            grid.relayEvents(me, [
                'beforeedit',
                'edit',
                'validateedit',
                'canceledit'
            ]);
            grid.isEditable = true;
            grid.editingPlugin = grid.view.editingPlugin = me;
    
            // additional code to cancel editing before a grid is hidden
            grid.on('beforehide', function(grid) {
                var view = grid.view;
    
                if (view && view.editingPlugin) {
                    view.editingPlugin.cancelEdit();
                }
            });
    
            // additional code to cancel editing before a grid is destroyed
            grid.on('beforedestroy', function(grid) {
                var view = grid.view;
    
                if (view && view.editingPlugin) {
                    view.editingPlugin.cancelEdit();
                }
            });
    
        }
    });
    

    I would also recommend looking into MVC architecture, it would make handling things like this alot easier for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got problem with Listview in Android. Then I try to set adapter to
I've got a component, which extends from Ext.button.Button, and another component, wrappanel, which is
Got problem with PDOStatement->fetch under symfony (v1.4.6) as while fetching records from statement first
i got problem with my code and hopefully someone able to figure it out.
I got problem with sending data in Android using httpPost. I found some example,
I've got problem with DirectX in C#. I want to draw some lines. Firstly
I've got problem for my application. I want to start connectbot from my application
I've got problem with connecting to MySQL database on my freshly installed Windows 7
have a nice day. I got problem when trying to create an image from
I want to ask about strcpy. I got problem here. Here is my code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.