var textfield = Ext.getCmp('description');
    textfield.on('specialkey', function (el, e) {
        if(e.keyCode == e.ENTER) {
          getData();     
        }
    });
Posted by 저기요씨
            {xtype: 'textfield',    id:'vendor_name',  x: 230, y: 185, width: 120, value: '',
             listeners: {        
                 afterrender: function( field ) {
                     field.getEl().on('click', function( event, el ) {
                         alert('aaa');
                     });        
                  }    
             }
            }
Posted by 저기요씨

handler : function() {
          gridStore.loadData(myData);
        }



gridStore는 store 이름
myData는 실제 데이터

Posted by 저기요씨

  var document_uploadpanel = new Ext.Window({
     id: 'document_uploadpanel',
     width : 450,
     height : 300,
     autoheight: true,
     closeAction:'hide',
     frame : true,
     items :  grid
  });
    store.load({});
// 윈도우를 그리고 난 후


{xtype: 'button', text: '문서첨부', width: 50, x: 745, y: 5,
       handler: function(){
              document_uploadpanel.show();
       }              
 }
// 버튼 클릭시 위의 윈도우를 호출


하지만 버튼을 처음 눌르고 닫을 시에는 윈도우 창이 제대로 작동하지만 닫은 윈도우를 다시 열기위해  버튼을 누르면
dom undefine 에러가 발생한다. 윈도우 창을 만들 시에는 closeAction:'hide' 옵션을 넣어 주어야한다.

'머리아파 > 혼자 공부하는 Extjs' 카테고리의 다른 글

textfield click 이벤트  (0) 2011.07.15
extjs grid refresh  (0) 2011.05.17
한글 전송 시 깨지지 않도록  (0) 2011.04.26
grid의 Column명 가져오기  (0) 2011.04.18
tree의 root node 열어 놓기  (0) 2011.04.14
Posted by 저기요씨
보내는쪽에
<script type="text/javascript" src="/ext/source/locale/ext-lang-ko.js" charset="utf-8"></script>

받는 쪽에
request.setCharacterEncoding("utf-8");

Posted by 저기요씨
var getCol = grid.getColumnModel().getDataIndex(colIndex);

Posted by 저기요씨
Ext.getCmp('tree-name').getRootNode().expand();

Posted by 저기요씨
   pop = new Ext.Window({ //
       autoscroll: false,
          layout:'fit',
          width:450,
          height:400,
          closable: true,
          resizable: false,
          plain: true,
          border: false,
          html: 'test page'
   });
   pop.show(); 
      })
Posted by 저기요씨
Window를 그렸을 때는 show() 이용
var xxx = Ext.window({
//code
});
 xxx.show();

기존 화면을 resize 하거나 component를 추가 한다거나 했을시
xxx.doLayout();

'머리아파 > 혼자 공부하는 Extjs' 카테고리의 다른 글

tree의 root node 열어 놓기  (0) 2011.04.14
pop window 만들기  (0) 2011.04.11
layout 공통으로 적용되도록 설정  (0) 2011.04.08
클릭 panel add 이벤트  (0) 2011.04.07
Grid 컬럼 사이즈 고정 방법  (0) 2011.04.06
Posted by 저기요씨

                                    layoutConfig: {
                                        padding:'5',
                                        pack:'center',
                                        align:'middle'
                                    }
Posted by 저기요씨