2013-04-12 3 views
0

내 그리드에는 Ext.grid.plugin.CellEditing 플러그인이 사용됩니다.CellEditing 플러그인 - 입력 유형 비밀번호

내 열은 내 데이터와 관련하여 동적으로 생성됩니다.

그리드는 다음과 같습니다 : 지금 열 key에 값 pass가 단일 행의 passwordtext에서 입력 필드 유형을 변경하려고

... 
    columns: [], 
    plugins: [ 
    Ext.create('Ext.grid.plugin.CellEditing', { 
     clicksToEdit: 1 
     listeners: { 
      beforeedit: function(oEditor, oOptions) { ... } 
      edit: function(oEditor, oOptions) { ... } 
     } 
    }) 
    ... 

.

| Key | Value | 
__________________| 
| id | 5  | 
| user | admin | 
| pass | **** | <-- this cell should be input type password 
___________________ 

내가 시도하는 것 :

이 아직 렌더링되지 않기 때문에 beforeedit이 실패 청취자 Ext.get('textfield-1160-inputEl').dom.type = 'password';를 통해 입력 유형을 변경.

어떻게하면됩니까?

답변

1

당신은 그리드에서 사용할 수있는 사용자 정의 필드를 만들 수 있습니다

Ext.define('Ext.form.PasswordField', { 
    extend: 'Ext.form.field.Base', 
    alias: 'widget.passwordfield', 
    inputType: 'password', 
}); 

당신은 그리드에서 xtype로 설정 어느 :

editor: { 
    xtype: 'passwordfield', 
    allowBlank: false, 
} 

http://jsfiddle.net/jvtjS/

+0

감사합니다. 편집시 비밀번호로 텍스트 필드를 입력하십시오. – Patrick

관련 문제