It works, but the photo selection block is generated below. Also in the console there is an error “ext-all.js:15 Uncaught TypeError: d.reset is not a function”. Here is my code:
var formConfig = Ext.create('Ext.grid.Panel', {
frame:true,
autoScroll:true,
allowEdit:false,
columnLines: true,
sortableColumns:false,
id: '$id$GridBarcodeParameters',
name: 'GridBarcodeParameters',
store: store,
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
pluginId: 'cellediting'
})],
selModel: {
selType: 'cellmodel'
},
columns: [
{
width: 30,
dataIndex: "RowNumber",
xtype: 'rownumberer',
text: "N"
},
{
xtype: "gridcolumn",
flex: 1,
dataIndex: "ID",
text: "ID"
},
{
dataIndex: 'PhotoFile',
text: "Photo",
flex: 1,
editor: {
xtype: 'form',
id: '$id$UploadPanel',
margin: '0 0 20 0',
flex: 1,
height: 50,
border: 0,
submitFile: submitFile,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
{
xtype: 'fileuploadfield',
name: 'PhotoFile',
buttonText: 'Choise...',
editable: true,
labelAlign: 'top',
listeners: {
afterrender: function (cmp) {
cmp.fileInputEl.set({
multiple: 'multiple'
});
}
}
}
]
}
}
]
});
I realized that the problem is in the xtype:form, but did not figure out how to fix it.