2013-08-02 1 views
0
이 기능으로 사용할 수 없다는처럼이 AppSDK 워드 프로세서 https://developer.help.rallydev.com/apps/2.0rc1/doc/#!/example/Grid 에 간단한 그리드 예에 도시 된 바와 같이 나는 인라인 그리드 colums을 편집 할 수 싶지만 보이는

를 사용하는 경우 그리드 열 편집을 만드는 방법 기본 사용자 정의 저장소를 사용하는 경우 경우 : 나는 간단한 그리드 예에서와 같이 필드가 편집되지 않는 이름을 클릭 내 응용 프로그램에서사용자 정의 저장소

_createGrid: function(stories) { 
    this.add({ 
     xtype: 'rallygrid', 
     store: Ext.create('Rally.data.custom.Store', { 
      data: stories, 
      pageSize: 100 
     }), 
     columnCfgs: [ 
      { 
       text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn', 
       tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate') 
      }, 
      { 
       text: 'Name', dataIndex: 'Name' 
      }, 
      //other columns... 
     ] 
    }); 
} 

.

답변

0

인라인 편집 기능을 추가하려면 코드를 다음과 같이 수정할 수 있습니다. 이름 열에 'textfield'를 설정하고 격자의 selType을 'cellmodel'로 설정하고 CellEditing 플러그인을 인스턴스화합니다.

_createGrid: function(stories) { 
     this.add({ 
      xtype: 'rallygrid', 
      store: Ext.create('Rally.data.custom.Store', { 
       data: stories, 
       pageSize: 100 
      }), 
      columnCfgs: [ 
       { 
        text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn', 
        tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate') 
       }, 
       { 
        text: 'Name', dataIndex: 'Name', editor: 'textfield' 
       } 
     //other columns... 
      ], 
      selType: 'cellmodel', 
      plugins: [ 
       Ext.create('Ext.grid.plugin.CellEditing', { 
       clicksToEdit: 1 
       }) 
      ] 

     }); 
    } 

here

을 Ext.grid.plugin.CellEditing에 설명서를 참조하십시오