업무관련/넥사크로
넥사크로 Grid3 로우추가 수정 및 상태 표시
레임보우
2023. 3. 31. 14:41
로우 추가하기
Nexacro (9684)> UD 14:19:27:341 Insert Rowtype: 2
1 2 3 4 5 6 7 8 9 10 11 | // 4-1 this.btn_Exe4_1_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { // 1에 로우 추가 var nRow = this.Dataset4.insertRow(1); // 현재 로우 타입 가져오기 var nType = this.Dataset4.getRowType(nRow); trace("Insert Rowtype: " + nType); this.txtRtn2.set_value("Insert Rowtype: " + nType); }; | cs |
1번 로우에 Nexacro 입력하기
Nexacro (9684)> UD 14:22:19:985 Update Rowtype: 4
1 2 3 4 5 6 7 8 | // Exe 4-2 this.btn_Exe4_2_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { this.Dataset4.setColumn(1, "FULL_NAME", "Nexacro"); var nType = this.Dataset4.getRowType(1); trace("Update Rowtype: " + nType); this.txtRtn2.set_value("Update Rowtype: " + nType); }; | cs |
적용되기 전 상태와 현재 상태
1 2 3 4 5 6 7 8 9 10 11 | // Exe 4-3 this.btn_Exe4_3_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { // 현재 적용된 상태 가져옴 var sCurData = this.Dataset4.getColumn(1, "FULL_NAME"); // 적용되기 전 상태 var sOrgData = this.Dataset4.getOrgColumn(1, "FULL_NAME"); trace("Cur Data=" + sCurData + " : Org Data=" + sOrgData); this.txtRtn2.set_value("Cur Data=" + sCurData + " : Org Data=" + sOrgData); }; | cs |
데이터 복사시 2종류 유의사항
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | // Exe 5-1 this.btn_Exe5_1_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { // 그냥 Grid 값만 가져옴 this.Dataset5.copyData(this.Dataset4); this.Grid5.createFormat(); }; // Exe 5-2 this.btn_Exe5_2_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { // RowType의 값도 가져옴 // 만약 transaction :U 옵션을 사용할시 아래처럼 사용해야 // RowType까지 읽어와서 수정된 상태를 확인하여 처리할수 있음 this.Dataset5.assign(this.Dataset4); this.Grid5.createFormat(); }; | cs |
그외에 Row 복사법
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | // Exe 5-3 this.btn_Exe5_3_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { var nFromRow = this.Dataset4.findRow("EMPL_ID", "KR040"); var nToRow = this.Dataset5.addRow(); this.Dataset5.copyRow(nToRow, this.Dataset4, nFromRow); }; // Exe 5-4 this.btn_Exe5_4_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo) { var nFromRow = this.Dataset4.findRow("EMPL_ID", "KR210"); var nToRow = this.Dataset5.addRow(); var sCol = "EMPL_ID=EMPL_ID, FULL_NAME=FULL_NAME"; this.Dataset5.copyRow(nToRow, this.Dataset4, nFromRow, sCol); }; | cs |