2012-09-03 4 views
0

파일 업로드로 GridPanel을 만들 수 있습니다.파일 업로드가있는 ExtJS 4 Grid

파일을 업로드하기 위해 일부 텍스트 열과 하나의 열이있는 GridPanel을 갖고 싶습니다.

dataIndex:'fieldForFile', 
editor: { 
    xtype:'filefield' 
} 

하지만 파일을 선택하고 렌더러가 사라지면 레코드 값은 null입니다.

다음 단계는 선택한 파일을 그리드에 업로드하는 것입니다. 그리고 지금은 어떻게해야할지 모릅니다.

아무도 도와 줄 수 있습니까?

인사말, 파블

답변

2
xtype:'actioncolumn', 
width: 30, 
text: '^', 
align: 'center', 
items: [{ 
    icon: '/Content/images/upload.png', // Use a URL in the icon config 
    tooltip: 'Upload', 
    handler: function(grid, rowIndex, colIndex) { 
      var uploadField = Ext.getCmp('uploadField'); 
      uploadField.fileInputEl.dom.click(); 
    } 
}]