Unselectable grid checkbox column

As a variable

var sm_og = Ext.create('Ext.selection.CheckboxModel',{
    checkOnly:true,
    listeners:{
       // prevent selection of records with invalid descriptions
       beforeselect: function(selModel, record, index) {
          if ((Ext.String.trim( record.get('x_field')) == '')) {
             Ext.Msg.alert('Please complete the record! ','You cannot check these rows until you complete x field.');
             return false; 
          } 
       }
   }
});

You can also add this to the class definition of the grid, by defining the "selModel" configuration setting.

Last update: October 23rd at 10:15pm