1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    4
    Vote Rating
    0
    andomichael is on a distinguished road

      0  

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

    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
    311
    Answers
    59
    Vote Rating
    51
    droessner is a jewel in the rough droessner is a jewel in the rough droessner is a jewel in the rough

      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

Thread Participants: 1