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 6582409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:16:35+00:00 2026-05-25T16:16:35+00:00

I have a grid panel using cell editing plugin. In this grid panel, I

  • 0

I have a grid panel using cell editing plugin.

In this grid panel, I want conditional editing on a cell in following manner:

When a user clicks on the cell to edit, there should be confirm dialog shown – “Do you want to edit the cell?” – if he chooses ‘Yes’ then the cell is focussed and editing begins otherwise the cell remains disabled.

I have tried using ‘beforeedit’ event, but the user is able to modify the values using the arrow keys (as the editor is a numberfield) even when the confirm box is being displayed, that is, though the mouse-click is disabled but arrow keys can still change the value of the field.

Also, when the user chooses ‘Yes’ then the cell looses focus and I am not being able to make it begin edit right after ‘Yes’ click. I have tried using ‘focus’ method but no luck.

Could some guide at this?

Thanks in advance.

More Information:

I tried using – startEditByPosition() – function of cell editing plugin when user chooses ‘Yes’. But then, due to this, the confirm box keeps appearing back, as on choosing ‘Yes’ editing starts which call the beforeedit event again. Any help?

  • 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-05-25T16:16:36+00:00Added an answer on May 25, 2026 at 4:16 pm

    You can create some flag variable like isEditAllowed. Check it in beforeedit. If it is false show confirm else do nothing. If user confirms set isEditAllowed to true and startEditByPosition. In edit event set isEditAllowed to false:

            plugins: [
              Ext.create('Ext.grid.plugin.CellEditing', {
                  clicksToEdit: 1,
                listeners: {
                  'beforeedit': function(e) {
                    var me = this;
                    var allowed = !!me.isEditAllowed;
                    if (!me.isEditAllowed)
                      Ext.Msg.confirm('confirm', 'Are you sure you want edit?', function(btn){
                        if (btn !== 'yes')
                          return;
                        me.isEditAllowed = true;
                        me.startEditByPosition({row: e.rowIdx, column: e.colIdx});
                      });
                    return allowed;
                  },
                  'edit': function(e) {
                    this.isEditAllowed = false;
                  }
                }
              })
          ],
    

    Here is demo.

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

Sidebar

Related Questions

I am generating data in a grid panel using json store. I have to
i'm using an gridview inside the update panel.now in that grid i have 3
I have added checkbox selection model to grid panel. It works fine in IE8
I have and Update Panel with a Grid inside of it. The grid's data
I am using vb.net code. I have grid view, please see the code below:
I have a grid that has multiple rows. I want to hide/show one of
I have a grid in a XAML file in a WPF project. This MainGrid
I have a gridview in an update panel and am using a jQuery dialog
I have stack panel containing three textblocks bounded with different member variable.I want to
I've created a frame with a 3x3 grid of buttons using this code... JFrame

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.