Results 1 to 2 of 2

Thread: How to set disabled field column on grid depending on record value (EXTJS) ?

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default Unanswered: How to set disabled field column on grid depending on record value (EXTJS) ?

    Hy, i new to use Extjs..
    i have a gridpanel like this:

    Code:
          var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
                clicksToEdit: 1
          });
    
          var myGrid = Ext.create('Ext.grid.Panel', {
                store: myStore,
                plugins: [cellEditing],
                columns: [  
                        {dataIndex: 'colid', hidden: true},
                        {text: "Name", dataIndex: 'colname', sortable: true},
                        {text: "Info", dataIndex: 'colinfo', sortable: true},
                        {text: "Value", dataIndex: 'colvalue',
                         editor: {
                           xtype: 'textfield'
                         }
                    }
                ]
            });
    Now i want to set editor to null (like column colinfo,colname and colid) column colvalue when colinfo value is "Can not edit this value!!"..
    How i to configure that's condition??

  2. #2
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    316
    Answers
    59
    Vote Rating
    59
      0  

    Default

    You can add a beforeedit listener to your plugin and have it return false when you don't want the cell to be editable.

    http://docs.sencha.com/ext-js/4-1/#!...ent-beforeedit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •