title: what to write in the controller for delete in extjs
body: <p>..................My view.................................................</p>
  
  <pre><code>Ext.define('AM.view.emp.EDUGRID', {
      extend: 'Ext.grid.Panel',
      alias: 'widget.education',
      title: 'All Users',
      store: 'AddEdu',
      //id:'111',
      dockedItems: [{
          xtype: 'toolbar',
          items: [{
              iconCls: 'icon-add',
              text: 'Add',
              action: 'save'
  
          }, {
              iconCls: 'icon-delete',
              text: 'Delete',
              disabled: true,
              itemId: 'delete',
              scope: this,
              action: 'Del'
          }]
      }],
      initComponent: function () {
  
          this.columns = [{
              header: 'Level',
              dataIndex: 'Level',
              flex: 1
          }, {
              header: 'institute',
              dataIndex: 'institute',
              flex: 1
          }, {
              header: 'specialization',
              dataIndex: 'specialization',
              flex: 1
          }, {
              header: 'YoP',
              dataIndex: 'YoP',
              flex: 1
          }]
  
          this.callParent(arguments);
          this.getSelectionModel().on('selectionchange', this.onSelectChange, this);
      },
      onSelectChange: function (selModel, selections) {
          this.down('#delete').setDisabled(selections.length === 0);
      }
  });
  </code></pre>
  
  <p>After clicking the del button it goes to the controller where i will have to specify the delete operation.but am not sure about what to give inside the delete function.
  here is my controller.................................................................</p>
  
  <pre><code>Ext.define('AM.controller.Users', {
      extend: 'Ext.app.Controller',
      stores: ['Users', 'Nationality', 'Maritalstatus', 'Empcat', 'Designation', 'Department', 'AddEdu'],
      models: ['User',
          'nationality',
          'maritalstatus',
          'empcat', 'designation', 'department', 'AddEdu'],
      views: [
          'user.List',
          'user.Edit',
          'emp.PD',
          'emp.JD', 'emp.WE',
          'emp.EDUGRID',
          'emp.eduform'],
  
      init: function () {
          this.control({
  
              'education button[action=save]': {
  
                  click: this.EduQ
              },
              'edu button[action=save]': {
                  click: this.UpdateEdu
              },
              'education button[action=Del] ': {
                  click: function (grid, cell, row, col, e) {
                      var rec = this.grid.getStore().getAt(row);
                  }
              }
          });
      },   
  </code></pre>
  
  <p>What should i put inside EduD       </p>
  
  <pre><code>    EduD: function (view, cell, row, col, e) {
             var record = this.getGrid().store.getAt(row)
             this.deleteRecord([record])
         },
  
         EduQ: function (grid, record) {
             var view = Ext.widget('edu');
         },
  
         UpdateEdu: function (button) {
             var win = button.up('window');
             var form = win.down('form').getForm();
             if (form.isValid()) {
                 var record = form.getRecord();
                 var values = form.getValues();
                 if (!record) {
                     var newRecord = new AM.model.AddEdu(values);
                     this.getAddEduStore().add(newRecord);
                 } else {
                     record.set(values);
                 }
                 win.close();
             }
         }
  });
  </code></pre>