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

  • Home
  • SEARCH
  • 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 668729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:04:23+00:00 2026-05-14T00:04:23+00:00

I currently have a GridPanel with the Ext.ux.RowEditor plugin. Four fields exist in the

  • 0

I currently have a GridPanel with the Ext.ux.RowEditor plugin. Four fields exist in the row editor: port, ip address, subnet and DHCP. If the DHCP field (checkbox) of the selected row is checked, I need to make the other three fields un-editable.

I’ve been trying to perform this code when the beforeedit event is triggered, but to no avail… I’ve only found ways to make the entire column un-editable. My code so far:

this.rowEditor.on({
    scope: this,
    beforeedit: this.checkIfEditable
});

checkIfEditable:function(rowEditor, rowIndex) {
    if(this.getStore().getAt(rowIndex).get('dhcp')) {
        // this function makes the entire column un-editable:
        this.getColumnModel().setEditable(2, false); 

        // I want to make only the other three fields of the current row 
        // uneditable.
    }
 }

Please let me know if any clarification is needed.

Any help potentially extending RowEditor to accomplish the target functionality would be greatly appreciated as well!

  • 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-14T00:04:24+00:00Added an answer on May 14, 2026 at 12:04 am

    You can add into RowEditor.js within the function startEditing the call to the function isCellEditable

    //.... RowEditor.js
    startEditing: function(rowIndex, doFocus){
    //.... search for the starting of the below loop into the source code
                var cm = g.getColumnModel(), fields = this.items.items, f, val;
                for(var i = 0, len = cm.getColumnCount(); i < len; i++){
                    val = this.preEditValue(record, cm.getDataIndex(i));
                    f = fields[i];
                    f.setValue(val);
    
                    // *** here add a call to isCellEditable *** //
                    f.setDisabled(!cm.isCellEditable(i, rowIndex));
                    // ***************************************** //
    
                    this.values[f.id] = Ext.isEmpty(val) ? '' : val;
                }
    //....
    

    Then override the isCellEditable of your column model and disabled the field based on you condition:

    YYY.getColumnModel().isCellEditable = function(colIndex, rowIndex){
     if (grid.getStore().getAt(rowIndex).get('dhcp')) {
        // you can do more check base on colIndex
        // only to disabled the one you want
        return false; 
      }
      return Ext.grid.ColumnModel.prototype.isCellEditable.call(this, colIndex, rowIndex);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.