title: ExtJS Grid Delete Row - Getting Selected Row
body: <p>I am getting the following error when trying to get the selected row:</p>
  
  <pre><code>Uncaught TypeError: Object #&lt;HTMLDivElement&gt; has no method 'getView'
  </code></pre>
  
  <p>How do  get the current selected row when I can't get the View and hence the SelectionModel?</p>
  
  <p>My View Code:</p>
  
  <pre><code>Ext.define('MyLodge.view.content.MemberGrid', {
  extend: 'Ext.grid.Panel',
  alias: 'widget.membergrid',
  
  
  
  initComponent: function(){
  
      var rowEditing = Ext.create('Ext.grid.plugin.RowEditing');
  
      var store = Ext.create('MyLodge.store.Members');
  
      Ext.apply(this, {
          height: this.height,
          plugins: [rowEditing],
          store: store,
          stripeRows: true,
          columnLines: true,
          columns: [{
              id       :'id',
              text: 'ID',
              width: 40,
              sortable: true,
              dataIndex: 'id'
          },{
              text   : 'Name',
              flex: 1,
              sortable : true,
              dataIndex: 'name',
              field: {
                  xtype: 'textfield'
              }
          },{
              text   : 'E-Mail',
              width    : 150,
              sortable : true,
              dataIndex: 'email',
              field: {
                  xtype: 'textfield'
              }
          },{
              text   : 'Href',
              width    : 200,
              editable: false,
              sortable : true,
              dataIndex: 'href'
          }],
          dockedItems: [{
              xtype: 'toolbar',
              items: [{
                  text: 'Add',
                  iconCls: 'icon-add',
                  handler: function(){
                      // empty record
                      store.insert(0, new MyLodge.model.Member());
                      rowEditing.startEdit(0, 0);
                  }
              }, {
                  text: 'Delete',
                  iconCls: 'icon-delete',
                  handler: function(){
                      var selection = grid.getView().getSelectionModel().getSelection()[0];
                      if (selection) {
                          store.remove(selection);
                      }
                  }
              },'-',{
                  text: 'Save',
                  iconCls: 'icon-save',
                  handler: function(){
                      store.sync({
                          success: function(response){
                              store.load()
                          }
                      });
  
                  }
              },{
                  text: 'Refresh',
                  handler: function(){
                      store.load();
                  }
              }]
          }]
      });
  
      this.callParent(arguments);
      }
  });
  </code></pre>