2012-11-29 7 views
0

이 그리드 및 양식 패널이 있습니다. 폼 패널에 데이터 격자를 추가하고 폼 패널의 단추가 여전히 필요합니다.ext.form.panel에 ext.grid.panel을 추가 할 때 오류가 발생했습니다.

 myGrid= Ext.create('Ext.grid.Panel',{ 
      layout: { 
       type: 'fit' 
      }, 

      id: 'gridId', 
      title: null, 
      store: myDataStore, 
      columns: [{ 
       header: 'header 1', 
       dataIndex: 'index_1', 
       width: 120 
      }, { 
       header: 'header 2', 
       dataIndex: 'index_2', 
       width: 120 
      }, { 
       header: 'header 3', 
       dataIndex: 'index_3', 
       width: 120 
      }], 
      stripeRows: true 
     }) 

     formPanel= Ext.create('Ext.form.Panel',{ 
      id:'panelId', 

      items:[myGrid], 
      buttons: [{ 
       // cancel, save, other buttons 
      }] 
     }) 

하지만 난 무슨 일이 오류를합니까

HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy 

거야?

+2

이 코드에는 오류가 표시되지 않습니다. 나는 샘플을 가지고있다 : http://jsfiddle.net/wPWxN/ – Krzysztof

답변

1

Ext.create() 구성 뒤에 세미콜론을 잊어 버렸습니다.

여기에서 잘 작동합니다. 나는 바이올린을 만들었습니다

http://jsfiddle.net/WGgR8/1/

관련 문제