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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:44:36+00:00 2026-05-24T00:44:36+00:00

So I have a ExtJs 4 Grid Panel that has two columns. Column ONE

  • 0

So I have a ExtJs 4 Grid Panel that has two columns.

Column ONE is a ComboBox with a custom renderer

Ext.ux.comboBoxRenderer = function(combo) {
    return function(value) {
        var idx = combo.store.find(combo.valueField, value);
        var rec = combo.store.getAt(idx);

        return (rec == null ? '<img src="/js/extjs4/resources/themes/images/default/grid/loading.gif" />' : rec.get(combo.displayField) );
    };
}

Column TWO is a numeric column

{
  allowBlank: false,
  header: 'Time',
  dataIndex: 'tedPaidTime',
  align: 'right',
  field: {
     xtype: 'numberfield',
     allowBlank: false,
     minValue: 0,
     maxValue: 100000
  },
  flex: 0.20,
  selectOnFocus:true
}

Now, when I load the DataStore, I want the FIRST column to be read only. Which is easy if I set the ReadOnly flag.

However, I have a button that adds a NEW record to store and I want that new record to NOT have the readonly flag.

So basically, once you change column one and save, you can not alter it. Only able to alter new records before they are saved.

The business rules here require them to delete the old record if it’s incorrect.

Thanks.

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

    I was able to solve this myself.

    Basically, I recorded the combo on the selectionchange event.
    Then, in the focus event, I checked to see if it had a required data key from the store. If not, then I assume a new row and ran the following:

    focus: function(combo) {
               var cb = combo;
               if(newTEDetailRecord) {
                  if(newTEDetailRecord.data["activityKey"] == "") {
                     console.log("newTEDetailRecord", newTEDetailRecord);
                     cb.setEditable(true);
                     cb.setReadOnly(false);
                     cb.focus();
                     cb.selectText();
                  } else {
                     cb.setReadOnly(true);
                  }
               }
            },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my extjs column model, here is what i have: new Ext.grid.ColumnModel({ columns: [
I am displaying a ext JS grid panel with 2 columns. I have to
I have an ExtJS grid that has a button set up in it. The
ExtJS has Ext.each() function, but is there a map() also hidden somewhere? I have
I have ExtJS View-Port panel , that contain center panel, that contain tablpanel ,
I have implemented the getAdditionalData in ExtJS's grid.panel . I have it showing the
I'm new in Ext and I have a problem: I'm trying to fill extjs-grid
I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ I have this one function where
I have created Form and Grid Panel in Extjs now i want to display
I have a layout that looks like the following: Ext.Viewport{ Ext.Panel{ Ext.Panel{ Ext.TabPanel{ Ext.Panel{

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.