title: Ext JS get grid's selected row
body: <p>On <code>someButton</code> click event I want to get the selected row of <code>someGrid</code> and <code>Do something</code> in event-handler dependent on that. How can I do that? I tried using </p>
  
  <pre><code>var index = someGrid.getSelectionModel().getSelection().selectedIndex; 
  var index = someGrid.getSelectionModel().getSelection().selected;
  </code></pre>
  
  <p>Both of this lines of code return empty objects.</p>
  
  <pre><code>flex: 1,
                  xtype: 'grid',
                  style: 'margin: 10px 5px;',
                  store: 'CL.Store.VendorServiceLimits',
                  itemId: 'vendorServiceLimitsGrid',
                  columns: [
                      { text: Labels.Vendors.MIN_AMOUNT, dataIndex: 'MinOperationAmount', flex: 1 },
                      { text: Labels.Vendors.MAX_AMOUNT, dataIndex: 'MaxOperationAmount', flex: 1 },
                      { text: Labels.Vendors.MAX_TRANS_PER_DAY, dataIndex: 'MaxOperationsPerDay', flex: 1 },
                      { text: Labels.Vendors.OPERATION_TYPE, dataIndex: 'OperationType', flex: 1 },
                      { text: Labels.Vendors.PERIOD, dataIndex: 'Period', flex: 1 },
                      { dataIndex: 'Id', hidden: true }
                  ],
  </code></pre>