양식에 표를 만들고 동적으로 레코드를 표시하고 있으며 파일 편집기를 사용하여 셀을 편집하여 주석 열을 편집하고 다른 열에서는 파일을 찾고 첨부 파일 열에 전체 경로가 표시됩니다. 내가 사용하고있는 코드를 참조하십시오 : 그리드 기록을로드 한 후ExtJS의 표 셀에 파일 필드를 표시하는 방법
{
xtype: 'container',
flex: 1,
layout: {
type: 'fit'
},
items: [
{
xtype: 'grid',
itemId: 'myAttachGrid',
reference: 'myAttachGrid ',
store: Ext.create('JSSample.store.attach.MyAttachGrid'),
multiSelect: true,
autoScroll: true,
columnWidth: 1,
editable: true,
columnLines: true,
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToMoveEditor: 1,
autoCancel: false
})
],
columns: [
{
header: 'File', dataIndex: 'Attachments', width: '40%'
},
{
header: '',
dataIndex: '',
width: '10%',
hideable: true,
editor: {
xtype: 'filefield',
labelWidth: 50,
msgTarget: 'side',
buttonOnly: true,
anchor: '100%',
buttonText: '...',
listeners: {
change: function (fld, value) {
alert(value.replace(/C:\\fakepath\\/g, ''));
}
}
}
},
{
header: 'Comments', dataIndex: 'Comments', width: '50%', editor: 'textfield'
}
]
}
]
}
을 다음과 같이 동적으로 표시됩니다
이제 내 문제는 FileField와 우리가 두 번 클릭하면 이후에 표시된다 세포. [아래의 스크린 샷이다] :
그래서, 나는 볼에 [셀을 두 번 클릭하지 않고] 기록과 및 FileField를 원한다.
사용 된 ExtJS 버전을 제공하십시오. ExtJS 6에는 사용할 수있는 [widgetcolumn] (http://docs.sencha.com/extjs/6.0.1/classic/Ext.grid.column.Widget.html)이 있습니다. – Alexander
사용 중 - Ext JS 6.0.2.437 –