2013-04-30 1 views
2

mvc로 숫자 필드에 특수 키 이벤트를 추가하는 방법. 아무도 도와 줄 수 있어요. extjs4.1 mvc로 필드에 특수 키 이벤트를 추가하는 방법

extend    : 'Ext.form.Panel', 
    alias    : 'widget.sv01i00900104', 
    id     : 'sv01i00900104', 


{ 
      xtype    : 'numberfield', 
      name    : 'rebatePercent', 
      fieldLabel  : 'Percent:', 
      flex    : 1, 
      minValue   : 0, 
      maxValue   : 100, 
      mouseWheelEnabled : false, 
      hideTrigger  : true, 
      decimalPrecision : 0, 
      keyNavEnabled  : false           
     } 

답변

1

아래에있는 내 from.panel의 텍스트 필드 나는이 당신에게 그것의 작업 @omar

'sv01i00900104 numberfield[name = rebatePercent]' :{  
      specialkey: function (field, el) { 
       if (el.getKey() == Ext.EventObject.ENTER){ 
        console.log('hello world'); 
       } 
       } 
     } 
+0

감사합니다 도움이 될 것입니다 – Umar

관련 문제