그리드 input_type 속성 가이드

그리드 데이터부의 input_type 속성 값 유형 예시 화면이다.

그리드 데이터부의 input_type 속성은 컬럼 데이터부에 데이터를 표시하는 방식을 설정한다.

관련 속성으로 input_type이 있다.

관련 API로 getcolumninputtype. setcolumninputtype, getiteminputtype, setiteminputtype이 있다.

템플릿 위치: /HTML5/COMPONENT/GRID/grid_inputtype_basic

템플릿 파일

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
31
32
33
34
35
36
37
38
39
40
41
42
// "setcolumninputtype" 버튼 이벤트
function btn_setcolumninputtype_on_click(objInst)
{
    var input_type;
 
    input_type = this.grd.getcolumninputtype(0);
 
    // input_type이 editbox인 경우, calendar로 변경
    if (input_type == 0) {
        this.grd.setcolumninputtype(0, 3);
        this.grd.setheadertext(1, 0, "calendar");
    }
    // input_type이 editbox가 아닌 경우, editbox로 변경
    else {
        this.grd.setcolumninputtype(0, 0);
        this.grd.setheadertext(1, 0, "editbox");
    }
 
    // 변경된 컬럼 input_type 표시
    this.grd.refresh();
}
 
// "setiteminputtype" 버튼 이벤트
function btn_setiiteminputtype_on_click(objInst)
{
    var input_type;
 
    // 아이템별 input_type을 구함
    input_type = this.grd.getiteminputtype(1, 0);
 
    // 아이템별 input_type 미지정 상태인 경우, 컬럼의 input_type을 구함
    if (input_type == -1) { input_type = this.grd.getcolumninputtype(0); }
 
    // input_type이 editbox인 경우, calendar로 변경
    if (input_type == 0) {
        this.grd.setiteminputtype(1, 0, 3);
    }
    // input_type이 editbox가 아닌 경우, editbox로 변경
    else {
        this.grd.setiteminputtype(1, 0, 0);
    }
}

  • guide/component/grid/grid_inputtype_basic.txt
  • 마지막으로 수정됨: 2024/01/24 16:05
  • 저자 127.0.0.1