반응형
Form - Properties - Event - onbeforeclose : form이 닫히기 직전에 발생하는 이벤트.
this.Exe_dataset_onbeforeclose = function(obj:nexacro.Form, e:nexacro.CloseEventInfo) {
if(this.fn_checkdata(this.dataset)) {
return "변경된 데이터가 존재합니다. 닫으시겠습니까?";
}
};
// fn_checkdata 함수
this.fn_checkdata = function(objDs) {
if(this.dataset.getDeletedRowCount() > 0) { // 삭제된 데이터가 있다면,
return true;
}
for(var i = 0; i < this.dataset.rowcount; i++) {
var nRowType = this.dataset.getRowType(i);
if(nRowType == 2 || nRowType == 4) { // 신규나 변경된게 있다면,
return true;
}
}
return false;
}
'Nexacro' 카테고리의 다른 글
[Nexacro] 데이터셋 복사 관련 예제 (0) | 2021.11.23 |
---|---|
[Nexacro] 데이터셋 레코드 상태 확인 예제 (0) | 2021.11.23 |
[Nexacro] 데이터셋 검색 예제 (0) | 2021.11.23 |
[Nexacro] 주석 처리/해제 단축키 (0) | 2021.11.23 |
[Nexacro] 동기&비동기 방식 (0) | 2021.11.22 |
댓글