我想在我的网格中获取所选单元格的值。我有以下代码:
方法:
createPlaylist: function(record){
var scope = this;
var srecords = getShowImages.getSelectionModel().getSelection();控制台.log(srecords); }
我使用 console.log 检查我是否得到任何价值。
网格视图:
Ext.ns('dlti.view.widget');
Ext.define('dlti.view.widget.ShowImages' ,{
extend: 'Ext.grid.Panel',
id: 'dlti-grid-images',
alias: 'widget.ShowImages',
forceFit: true,
stripeRows: true,
selType: 'checkboxmodel',
multiSelect: true,
autosync: true,
height: 250,
width: 470,
store: new dlti.store.UploadStore(),
columns: [
{
text: 'Images',
dataIndex: 'imagepath',
renderer: function renderIcon(val) {
return '<img src="' + val + '"width="100px" height="100px" align="middle">';
},
},
{
text: 'Filename',
dataIndex: 'filename',
renderer: function renderDescTarget(val, p, record) {
var desc = '';
desc = '<p style="color:#000;font-size:12px;">' + val + '</p>';
return desc;
}
}
]
});