在someButton
单击事件上,我想获得依赖于它的事件处理程序中someGrid
的选定行。Do something
我怎样才能做到这一点?我尝试使用
var index = someGrid.getSelectionModel().getSelection().selectedIndex;
var index = someGrid.getSelectionModel().getSelection().selected;
这两行代码都返回空对象。
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 }
],