20230308 - IG 값(조건)에 따라서 다른 (하위) 리전 읽기전용 ReadOnly

완벽하지는 않지만 두 가지 설정을 조합하여 구현

1. DA에서 IG 수정 가능하게 하는 편집 버튼과 추가 버튼을 보이지 않게 처리


var model = this.data.model;

if(this.data != null) {
    if(this.data.selectedRecords[0] != null) {
        if (model.getValue(this.data.selectedRecords[0], "COMPLETED_YN") == "Y") {
            apex.region("SID_DTL_IG").call("getActions").hide("selection-add-row");
            $("#SID_DTL_IG_ig div[data-action=edit]")[0].style.display = "none";
        }
        else {
            apex.region("SID_DTL_IG").call("getActions").show("selection-add-row");
            apex.region("SID_DTL_IG").call("getActions").enable("selection-add-row");
            $("#SID_DTL_IG_ig div[data-action=edit]")[0].style.display = "block";
        }
    }
}




2) 그래도 IG 더블클릭하면 다시 수정모드로 들어가는데 이 때는 IG Allowed Row Operations Column으로 제어


     , (select decode(mst.completed_yn, 'Y', '', 'UD') from mst where mst.pid = dtl.pid) row_operation




참고

https://forums.oracle.com/ords/apexds/post/how-to-make-an-ig-region-read-only-depending-of-the-value-o-9589

댓글 없음:

댓글 쓰기

20250202 - IG 다운로드 버튼 바로 보이기

JS initialization Code : function (config) {     var $ = apex.jQuery,         toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(),  ...