/*---------------------------------------------------------------------------------------------- * 설명 : grid column중 dataset과 bind된 column의 edit max length 설정. * 파라미터 : pGridArray : (필수) 대상 grid array * 리턴값 : N/A -----------------------------------------------------------------------------------------------*/ this.gf_ErpSetGridColMaxLength = function(pGridArray) { var nEditMaxLength = -1; var sBindCol = ""; var oOuter = this; if(this.gf_IsNull(pGridArray)) return; pGridArray.forEach(function(tGrid, idx) { for(var nCol = 0; nCol < tGrid.getFormatColCount(); nCol++) { try { sBindCol = tGrid._getBodyCellInfo(nCol).text._bindexpr; if( !oOuter.gf_IsNull(sBindCol) ) { nEditMaxLength = tGrid.bindDS.getColumnInfo(sBindCol).size; tGrid.setCellProperty("body",nCol,"editmaxlength",nEditMaxLength); }; } catch(e){}; }; }); };
사용예) this.gf_ErpSetGridColMaxLength([this.tab_subDetail.tap_subDetail1.form.grd_SSMCODE37113Out01, this.tab_subDetail.tap_subDetail2.form.grd_SSMCODE37113Out02, this.tab_subDetail.tap_subDetail3.form.grd_SSMCODE37113Out03, this.tab_subDetail.tap_subDetail4.form.grd_SSMCODE37113Out04, this.tab_subDetail.tap_subDetail5.form.grd_SSMCODE37113Out05]);