블로그 이미지
올해목표 // 10월 어학연수 떠나자~ 자수씨

카테고리

전체글 (1457)
Brand New! (28)
주절주절 (213)
MOT (11)
해외쇼핑 (49)
쇼핑노트 (150)
취미생활 (94)
iPhone (4)
Eclipse (121)
Google (83)
Spring (31)
JAVA (176)
JavaScript (59)
WEB (49)
Database (20)
OS (26)
Tools (8)
Tips (26)
IT정보 (1)
Book (21)
Programming (37)
외부행사 (43)
주변인들 (17)
여행노트 (60)
학교생활 (30)
회사생활 (52)
사회생활 (5)
외국어공부 (12)
잡동사니 (30)
Total
Today
Yesterday
 
04-26 07:42
 

달력

« » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
 

최근에 올라온 글

최근에 달린 댓글


ExtJS 의 EditorGridPanel 에서 입력되는 값이 공백으로 들어올 경우 반영이 되지 않도록 처리를 해야되는 경우가 발생하여서 API 문서를 확인하였으나, beforeedit 와 afteredit 이벤트는 있는데, 정작 edit 이벤트는 보이지 않았습니다.

그래서 valid 로 찾아보니 validateedit 라는 이벤트가 있었습니다.

validateedit : ( Object e )
Fires after a cell is edited, but before the value is set in the record. Return false to cancel the change. The edit event object has the following properties
  grid - This grid
  record - The record being edited
  field - The field name being edited
  value - The value being set
  originalValue - The original value for the field, before the edit.
  row - The grid row index
  column - The grid column index
  cancel - Set this to true to cancel the edit or return false from your handler.


두 번째 컬럼에 공백이 입력될 경우 edit 이벤트를 취소하는 예제는 아래와 같습니다. 


ExtJS 는 정말 항상 저의 상상을 초월합니다. 개발자들을 한번 뵙고 싶다는...

Posted by 자수씨
, |


EditorGridPanel 에서 콤보 박스의 경우 Ext.util.Format.comboRenderer 라는 것을 인터넷에서 쉽게 찾을 수 있었으나 체크 박스는 찾을 수가 없어 약간 어색하지만 구현을 해 보았습니다.




EditorGridPanel 의 clicksToEdit 속성을 1 정도로 주면 그나마 덜 어색해집니다.

EditorGridPanel 의 cellClick 이벤트를 받아서 처리해도 되지만... 일단은 이정도에서 마무리 합니다.


Posted by 자수씨
, |
ExtJS 에서 EditorGridPanel을 사용하는데 꼭 두번을 클릭해야 Combo가 확장이 되는 것 이었습니다.



이런식으로 한번 클릭하면 포커싱이 되고, 두 번 클릭해야 되는 불편함 때문에 고민을 했는데...
동료 직원이 짜 놓은 소스를 보고 찾아 냈습니다.

clicksToEdit : Number

The number of clicks on a cell required to display the cell's editor (defaults to 2).

Setting this option to 'auto' means that mousedown on the selected cell starts editing that cell.


http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.EditorGridPanel
EditorGridPanel 의 config 에 clicksToEdit 를 설정된 숫자 만큼 클릭을 해야 에디트가 가능하게 됩니다.




1로 설정할 경우 위와 같이 한방에 짜잔~~


Posted by 자수씨
, |

글 보관함

최근에 받은 트랙백