by Nathan

Wise Grid(와이즈 그리드) 본문

Programming/Wise Grid

Wise Grid(와이즈 그리드)

넷쓴 2018. 8. 28. 16:18



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
// WiseGrid 조회
WiseGrid_Test.GetCellValue("컬럼명", row);
 
// WiseGrid 수정
WiseGrid_Test.SetCellValue("컬럼명", rowNum, document.f1.컬럼명.value);
 
// WiseGrid 추가
WiseGrid_Test.AddRow();    
var rowNum = 0;
if(WiseGrid_Test.GetRowCount() != 0){
    rowNum = WiseGrid_Test.GetRowCount() - 1;
}
WiseGrid_Test.SetCellValue("컬럼명1", rowNum, document.f1.컬럼명1.value);
WiseGrid_Test.SetCellValue("컬럼명2", rowNum, document.f1.컬럼명2.value);
WiseGrid_Test.SetCellValue("컬럼명3", rowNum, document.f1.컬럼명3.value);
WiseGrid_Test.SetCellValue("컬럼명4", rowNum, document.f1.컬럼명4.value);
 
// WiseGrid 삭제
WiseGrid_Test.DeleteRow(rowNum);    // CRUD에 "삭제" 표시
WiseGrid_Test.SetRowHide(rowNum, true); // 화면 그리드에서 숨기기 처리할 때
 
// WiseGrid for
for(var row=0; row<WiseGrid_Test.GetRowCount(); row++){
    console.log("현재 row : ",row);
    for(var col=0; col<WiseGrid_Test.GetColCount(); col++){
        col_nm = WiseGrid_Test.GetColHDKey(col); // 컬럼명 획득
        console.log(col_nm + " : " + WiseGrid_Test.GetCellValue(col_nm, row));
    }
}
 
// 그리드 초기화
WiseGrid_Test.RemoveAllData();
 
cs


Comments