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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:06:06+00:00 2026-06-07T16:06:06+00:00

I am using ExtJs 3.4. I have a checkbox control in an ExtJs Grid.

  • 0

I am using ExtJs 3.4. I have a checkbox control in an ExtJs Grid. I want to disable the checkbox control based on when a value in the store is equal to zero.

I have tried this and it does not disable it:

var colModel = new Ext.grid.ColumnModel(
    {
        columns: [
            { id: 'AircraftOid', header: "AircraftOid", width: 100, sortable: true, locked: true, dataIndex: 'AircraftOid', hidden: true },
            { id: 'nNumber', header: "N-#", width: 100, sortable: true, locked: true, dataIndex: 'NNumber' },
            { header: "Make", width: 150, sortable: true, dataIndex: 'Make' },
            { header: "Model", width: 150, sortable: true, dataIndex: 'Model' },
            { header: "Register",
                width: 55,
                sortable: true,
                dataIndex: 'Register',
                xtype: 'checkcolumn'
            }
        ],
        isCellEditable: function (col, row) {
            return false;
        }
    });

var grid = new Ext.grid.GridPanel({
        store: aircraftStore,
        cm: colModel,
        sm: new Ext.grid.RowSelectionModel({ singleSelect: true }),
        viewConfig: {
            forceFit: true
        },
        height: 100,
        split: true,
        region: 'north'
    });

Thanks in advance.

  • 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-07T16:06:09+00:00Added an answer on June 7, 2026 at 4:06 pm

    Your thought was right. But…

    First, you’re overriding column model’s isCellEditable method to prevent editing. But Grid doesn’t calls that method. It only works on EditorGrid.

    Second, Ext.ux.grid.CheckColumn doesn’t handle any editable features, because it’s not an editor, it’s just a column.

    So for my project i modified it to act as a editor and added the readOnly property to prevent editing on normal Grids. If you set readOnly to true, it’ll not be clickable anymore.

    Ext.ux.grid.CheckColumn = Ext.extend(Ext.grid.Column, {
        processEvent : function(name, e, grid, rowIndex, colIndex) {
            if ( !this.readOnly && name == 'mousedown' ) {
                grid.stopEditing();
                var record = grid.store.getAt(rowIndex);
                var cm = grid.getColumnModel();
                var edit_e = {
                    grid: grid,
                    record: record,
                    field: this.dataIndex,
                    value: record.data[this.dataIndex],
                    row: rowIndex,
                    column: colIndex,
                    cancel: false
                };
                if ( grid.fireEvent( 'beforeedit', edit_e ) !== false && !edit_e.cancel ) {
                    record.set( this.dataIndex, !record.data[this.dataIndex] );
                    edit_e.cancel = null;
                    grid.fireEvent( 'afteredit', edit_e );
                }
                return false;
            } else {
                return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
            }
        },
    
        editable : false,
    
        readOnly : false,
    
        renderer : function(v, p, record){
            p.css += ' x-grid3-check-col-td'; 
            return String.format('<div class="x-grid3-check-col{0}">&#160;</div>', v ? '-on' : '');
        },
    
        init: Ext.emptyFn
    });
    
    Ext.preg('checkcolumn', Ext.ux.grid.CheckColumn);
    
    Ext.grid.CheckColumn = Ext.ux.grid.CheckColumn;
    
    Ext.grid.Column.types.checkcolumn = Ext.ux.grid.CheckColumn;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an EXTJS paging grid with checkbox selection model. I want to know
I'm using ExtJS on a registration page which should have no effect on this.
I have ExtJS Grid. And I am using Roweditor plugin with combobox. When I
I have an ExtJs Grid with CheckBoxSelectionModel . Selecting the header checkbox checks all
I am using extjs grid, and I have a jQuery timer, which will call
I am using ExtJs 4.1 framework. I have a grid which shows only one
I am using extjs combobox for a sex field. It have two value M
I am working on my first project using ExtJS. I have a Data Grid
I have a problem with a Ext.Grid.EditorGridPanel, I am currently using ExtJS 2.3.0, that
I am using ExtJS (v3) and I have a form built that I want

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.