// 입력 type string으로 변경 function textEditor(container, options) { kendoJQuery('') .addClass('k-input k-textbox') .appendTo(container) .blur(function(e) { if (e.originalEvent.target.value) { options.model.set("result", 1); } else { options.model.set("result", null); } }) } // 입력 type number로 변경 function numericEditor(container, options, isHyphenAllowed = false) { // 소수점을 입력받아야 하므로 항상 text 타입을 권장합니다. (number 타입의 브라우저 간섭 방지) var inputType = "text"; var input = kendoJQuery(''); input.appendTo(container) .val(options.model[options.field]) .on("focus", function() { this.select(); }) .on("keydown", function(e) { // 필요시, 숫자, 소수점(.), 하이픈(-), 백스페이스, 탭 등 필수 키만 허용하는 로직을 추가 }) .on("blur", function() { var valStr = this.value.trim(); if (isHyphenAllowed && valStr === "-") { options.model.set(options.field, "-"); } else if (valStr === "") { options.model.set(options.field, null); } else { // parseFloat은 "3.23"을 숫자 3.23으로 정확히 변환합니다. var valNum = parseFloat(valStr); if (isNaN(valNum)) { options.model.set(options.field, null); } else { // Kendo Model에 숫자로 반영 (이때 소수점이 유지됩니다) options.model.set(options.field, valNum); } } }); input.focus(); } function numericEditor2(container, options, isHyphenAllowed = false) { var input = kendoJQuery(''); input.appendTo(container) .val(options.model[options.field]) // 1. 입력 제한 (숫자 + 하이픈) .on("input", function () { let val = this.value; // 허용: "-", "-숫자", "숫자", "소수" if (!/^[-]?\d*\.?\d*$/.test(val)) { this.value = val.slice(0, -1); } }) // 2. ↑ ↓ 키로 값 증가/감소 .on("keydown", function (e) { if (e.key === "ArrowUp" || e.key === "ArrowDown") { e.preventDefault(); let val = this.value.trim(); // "-" 단독이면 0 기준 시작 if (val === "-" || val === "") { val = 0; } let num = parseFloat(val); if (isNaN(num)) num = 0; if (e.key === "ArrowUp") { num += 1; } else { num -= 1; } this.value = num; } }) // 3. blur 시 모델 반영 .on("blur", function () { let val = this.value.trim(); if (val === "-") { options.model.set(options.field, null); } else { let num = parseFloat(val); options.model.set(options.field, isNaN(num) ? null : num); } }); } //입력 type number로 변경 그러나 hyphen 입력 허용 function numericEditorAllowHyphen(container, options, isHyphenAllowed = false) { kendoJQuery('') .addClass('k-input k-textbox') .appendTo(container) .blur(function(e) { if (e.originalEvent.target.value) { options.model.set("result", 1); } else { options.model.set("result", null); } }) } // NumericTextBox from 텍스트 길이 제한 function numericLengthControl() { var ntb = kendoJQuery("#numeric-min-max").data("kendoNumericTextBox"); ntb._adjust = function(value) { var that = this, options = that.options, min = options.min, max = options.max; if (value === null) { return value; } element = this.element; var triggerEvent = function() { var evtData = { value: value, max: max, min: min }; setTimeout(function() { element.trigger("outOfRange", evtData); }, 1); }; if (min !== null && value < min) { triggerEvent(); value = min; } else if (max !== null && value > max) { triggerEvent(); value = max; } return value; }; kendoJQuery("#numeric-min-max").bind("outOfRange", function(e, data) { if (data.value > data.max) alert("입력하신 " + data.value + "는 입력하실수 없으며 입력가능한 최대 숫자는 " + data.max + " 입니다. "); else if (data.value < data.min) alert("입력하신 " + data.value + "는 입력하실수 없으며 입력가능한 최소 숫자는 " + data.min); }); } function isNumNull(v) { return (v === undefined || v === null) ? '0' : v; } function isNumNullBlank(v) { return (v === undefined || v === null) ? '' : v; } function isNumTextNull(v) { return (v === undefined || v === null) ? '' : v; } function fn_kendoAllDataXml01(kendoGridRoot, kendoColCount, kendoRowCount, kendoStartIndex, dataGrid){ var s = ""; var m = ""; for(var i=0; i"; for(var j=kendoStartIndex; j" + isNumNullBlank(row[ dataField ]) + ""; } } else { m = m + "<"+dataField+">" + isNumNullBlank(row[ dataField ]) + ""; } } m = m + ""; } var e = ""; return s+m+e; } function fn_kendoAllDataXml02(kendoGridRoot, kendoColCount, kendoRowCount, kendoStartIndex, dataGrid){ var s = ""; var m = ""; for(var i=0; i"; for(var j=kendoStartIndex; j" + isNumNullBlank(row[ dataField ]) + ""; } } else { m = m + "<"+dataField+">" + isNumNullBlank(row[ dataField ]) + ""; } } m = m + ""; m = m + ""; } var e = ""; return s+m+e; } //이미지 파일업로드 display관리 (열추가일 경우) function fn_kendoFileDisplayCol(nowColumnIndex, nowColLength, id, keyRowIndex){ if(document.getElementById(id+nowColumnIndex) != null){ document.getElementById(id+nowColumnIndex).style.display = ""; for(var i=1; istartIndex){ layoutStr = ""; //layout for(var i=1; i<=colCount-(startIndex+1); i++){ layoutStr = layoutStr + '\\ '; } //data for(var i=0; i"+changedDataXML+""));},300); pUrl = rUrl; setTimeout(function(){isAjax = false;},500); } //그리드 변경여부 function Is_GridUpdateKendo(changedDataXML){ if (changedDataXML == null) { return false; }else{ return true; } } //로딩바 숨김, 막은 그리드 해제 function fn_progressbarHideKendo(){ $("#progressbarDiv").addClass("trViewOff"); } //Grid 포커스 포지션 function setEditedItemPositionKendo(colIndex, rowIndex , grid) { var editedCell = {columnIndex:colIndex, rowIndex:rowIndex}; dataGrid.setEditedItemPosition(editedCell); document.getElementById(grid).focus(); } //Grid 포커스 포지션 (From) function setEditedItemPositionKendoFrom(colIndex, rowIndex , grid, dataGrid) { if (grid === "grid") { dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } else if (grid === "grid1") { dataGrid.editCell(kendoJQuery("#kictGrid1 tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } else if (grid === "grid2") { dataGrid.editCell(kendoJQuery("#kictGrid2 tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } else if (grid === "gridCheck") { dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } else if (grid === "gridCheck1") { dataGrid.editCell(kendoJQuery("#kictGrid1 tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } else if (grid === "gridCheck2") { dataGrid.editCell(kendoJQuery("#kictGrid2 tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } else { dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+(rowIndex + 1)+"') td:eq('"+(colIndex - 1)+"')")); } } function setEditedItemPositionKendoFrom2(colIndex, rowIndex , grid, dataGrid) { kendoJQuery("#kictGrid").find("td").removeClass("k-state-selected"); kendoJQuery("#kictGrid").find("tr:eq("+(rowIndex + 1)+")").find("td:eq("+colIndex+")").addClass("k-state-selected"); dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+rowIndex+"') td:eq('"+(colIndex)+"')")); } //Grid 포커스 포지션 (To) function setEditedItemPositionKendoTo(colIndex, rowIndex , grid, dataGrid) { if (grid === "grid") { dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+rowIndex+"') td:eq('"+colIndex+"')")); } else if (grid === "grid1") { dataGrid.editCell(kendoJQuery("#kictGrid1 tbody tr:eq('"+rowIndex+"') td:eq('"+colIndex+"')")); } else if (grid === "grid2") { dataGrid.editCell(kendoJQuery("#kictGrid2 tbody tr:eq('"+rowIndex+"') td:eq('"+colIndex+"')")); } else if (grid === "gridCheck") { dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+rowIndex+"') td:eq('"+(colIndex + 1)+"')")); } else if (grid === "gridCheck1") { dataGrid.editCell(kendoJQuery("#kictGrid1 tbody tr:eq('"+rowIndex+"') td:eq('"+(colIndex + 1)+"')")); } else if (grid === "gridCheck2") { dataGrid.editCell(kendoJQuery("#kictGrid2 tbody tr:eq('"+rowIndex+"') td:eq('"+(colIndex + 1)+"')")); } else { dataGrid.editCell(kendoJQuery("#kictGrid tbody tr:eq('"+rowIndex+"') td:eq('"+colIndex+"')")); } } //저장클릭 시, 숫자관련 길이 제한 (GRID) //type : COL, ROW 종류 //gridNotNull 파라미터에 false를 전달하면 kendo Grid에 null값을 넣어도 됨(예외처리) function fn_saveNumberCheckKendo(type, gridRoot, dataGrid, grid, startIndex, item, rowInfoItem, gridNotNull , kind){ var rowCount = gridRoot._view.length; //가로(행) 갯수 var colCount = rowInfoItem.length; //세로(열) 갯수 var chkDupFrom = []; //From 값 중복 체크 var chkDupTo = []; //TO 값 중복 체크 var chkDup = []; //시간간격 값 중복 체크 var chkDupRowFromTo = []; //Row의 경우 From, To 값 중복 체크 //COL if(type == "COL"){ //Row 검사 for(var r=0; r -1){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoFrom2(i, r , grid, dataGrid); return false; }else{ chkDupTo.push(val); } } if( temp.indexOf("FROM") > -1){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoFrom2(i, r , grid, dataGrid); return false; }else{ chkDupFrom.push(val); } } if(kind != "rockJoinshear" && kind != "rockPointload" && kind != "rockUniaxial"){ // To의 값, From의 값 검증 if(temp.indexOf("TO") > -1){ var column = dataGrid.columns[i]; var dataField = column.field; var gridDataArray = dataGrid._data; var columnName = dataField; var columnDataVector_from = gridDataArray[r-1][columnName]; var columnDataVector_to = gridDataArray[r][columnName]; columnDataVector_from = Number(columnDataVector_from); // number로 형변환 columnDataVector_to = Number(columnDataVector_to); // number로 형변환 var val = columnDataVector_from; var val2 = columnDataVector_to; if(fn_isNull(val) == "" || fn_isNull(val2) == "" || Number(val) >= Number(val2) ){ alert(item[r+"_title"]+"에 입력된 값이 이전에 입력된 심도(From)(m) 값보다 같거나 작은 값이 입력되었습니다. 확인바랍니다. "); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoFrom2(i, r , grid, dataGrid); return false; break; } } } } } } if(kind != "rockJoinshear" && kind != "rockPointload" && kind != "rockUniaxial"){ //중복 체크 함수에 심도 값을 담은 배열을 전달 if(false && (!chkDuplicates(chkDupFrom) || !chkDuplicates(chkDupTo))){ alert("심도 값이 중복되었습니다. 확인 후 다시 저장 바랍니다.") return false; } } } //ROW if(type == "ROW"){ for(var i=0; i 0) { for (var k=0; k -1 && temp.indexOf("FROM") > -1){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide if( r == 0){ setEditedItemPositionKendoFrom(i, r , grid, dataGrid); } else { setEditedItemPositionKendoFrom(i+1, r-1 , grid, dataGrid); } return false; break; }else{ chkDupFrom.push(val); } } // To(m) 경우, if( temp.indexOf("DEPTH") > -1 && temp.indexOf("TO") > -1){ //i = i + 1; val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoTo(i, r , grid, dataGrid); return false; break; }else{ chkDupTo.push(val); } } if(fn_isNull(val) != "" && val === "-") { } else if(fn_isNull(val) != "" && (is_float(val,Number(item[i+"_start_num"]),Number(item[i+"_end_num"])) == false || is_numberRange(val,Number(item[i+"_start_num"]),Number(item[i+"_end_num"])) == false )){ alert(title + "값의 범위를 확인하시기 바랍니다. ([2]정수 : "+item[i+"_start_num"]+"자리, 소수점 이하 : "+ item[i+"_end_num"]+"자리)"); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoFrom(i, r , grid, dataGrid); return false; break; }else if(fn_isNull(val) == "" && gridNotNull){ gridHasNull(title, i, r, grid, dataGrid); return false; break; } } } else { dataField = column.field; title = column.title; //헤더 텍스트 //심도 또는 from, to 중복값 체크 var temp = dataField.toUpperCase(); //자리수 체크 var gridDataArray = dataGrid._data; var columnName = dataField; var columnDataVector = gridDataArray[r][columnName]; var val = columnDataVector; if(fn_isNull(val) != "" && val === "-") { } else if(fn_isNull(val) != "" && (is_float(val,Number(item[i+"_start_num"]),Number(item[i+"_end_num"])) == false || is_numberRange(val,Number(item[i+"_start_num"]),Number(item[i+"_end_num"])) == false )){ alert(title + "값의 범위를 확인하시기 바랍니다. ([2]정수 : "+item[i+"_start_num"]+"자리, 소수점 이하 : "+ item[i+"_end_num"]+"자리)"); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoFrom(i, r , grid, dataGrid); return false; break; }else if(fn_isNull(val) == "" && gridNotNull){ gridHasNull(title, i, r, grid, dataGrid); return false; break; } //표준관입시험, 공내재하 심도값 중복체크 if( temp.indexOf("DEPTHSPT") > -1 || temp.indexOf("FIELDPRESDEPTH") > -1 ){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoTo(i, r , grid, dataGrid); return false; break; }else{ chkDupFrom.push(val); } } // FROM(m) 경우 if( temp.indexOf("DEPTH") > -1 && temp.indexOf("FROM") > -1){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoTo(i, r , grid, dataGrid); return false; break; }else{ chkDupFrom.push(val); } } // To(m) 경우 if( temp.indexOf("DEPTH") > -1 && temp.indexOf("TO") > -1){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoTo(i, r , grid, dataGrid); return false; break; }else{ chkDupTo.push(val); } } //현장투수시험 시간간격 경우 if( temp.indexOf("FIELDWPTESTSPACING") > -1 ){ val = fn_isNull(val); if( val == '' || val == null || val == 'null' ){ alert(title + "의 값이 입력되지 않았습니다. 확인 후 다시 저장 바랍니다."); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoTo(i, r , grid, dataGrid); return false; break; }else{ chkDup.push(val); } } } } } } } //중복 체크 함수에 심도 값을 담은 배열을 전달 if(false && (!chkDuplicates(chkDupFrom) || !chkDuplicates(chkDupTo))){ alert("심도 값이 중복되었습니다. 확인 후 다시 저장 바랍니다.") return false; } //중복 체크 함수에 시간간격 값을 담은 배열을 전달 if(!chkDuplicates(chkDup)){ if(temp.indexOf("FIELDWPLU") > -1){ }else{ alert("시간간격 값이 중복되었습니다. 확인 후 다시 저장 바랍니다.") return false; } } } return true; } //심도 중복 체크 function chkDuplicates(array) { var valuesSoFar = []; for (var i = 0; i < array.length; ++i) { var value = array[i]; if (valuesSoFar.indexOf(value) !== -1) { //중복된 값 존재 return false; } valuesSoFar.push(value); } //중복된 값 없음 return true; } //그리드에 null 값이 있는 경우 function gridHasNull(title, i, r, grid, dataGrid){ alert(title + "값을 입력해주세요. 값을 입력할 수 없는 경우 0 또는 -(하이픈)을 기입해주세요"); fn_progressbarHide(); //ProgressbarHide setEditedItemPositionKendoFrom2(i, r , grid, dataGrid); } //실수체크 function fn_saveFloatCheckKendo(type, gridRoot, dataGrid, grid, startIndex, dataIndex, rowInfoItem){ //RowCount var rowCount = gridRoot._view.length; // 가로(행) 갯수 //ColCount var colCount = rowInfoItem.length; // 세로(열) 갯수 //COL if(type == "COL"){ //Row 검사 for(var r=0; r",""); //헤더 텍스트 var totitle = gridRoot.getObjectById(toDataField).getHeaderText().replace("
",""); //헤더 텍스트 //값 var fromval = gridRoot.getItemFieldAt(r, fromDataField); var toval = gridRoot.getItemFieldAt(r, toDataField); //from to 비교 if(fn_fromToCheckAlert(fromval, toval, fromtitle, totitle, "") == false){ setEditedItemPosition2(fromIndex, r , grid, dataGrid); return false; } } } return true; } //파일사이즈, 확장자 검사 function fn_fileCheckKendo(gridRoot, rowCount, colCount, seqID1, seqID2, fileId, gubun, startCount){ if(gubun == "R" && rowCount > 0){ for(var f = 1; f < rowCount + 1; f++){ //var seq = gridRoot.getItemFieldAt(f, seqID1); var seq = f; //seq 두개의 조합으로 생길 때-----------------------------add if(seqID2 != "") seq += "_" + f; //seq 두개의 조합으로 생길 때-----------------------------add if(!fn_fileTotalCheck(fileId+seq)){ fn_fileClear(fileId+seq); return false; } } } if(startCount == null || startCount == "" || startCount == "undefined"){ startCount = 999; } if(gubun == "C" && colCount >= startCount){ //alert("CV"); //첨부파일이 있을경우 확장자 체크 for(var f = 1; f < (colCount - (startCount-1)); f++){ var seq = f; //seq 두개의 조합으로 생길 때-----------------------------add if(seqID2 != "") seq += "_" + f; //seq 두개의 조합으로 생길 때-----------------------------add // 테스트 //alert("fileId : " + fileId + seq); if(!fn_fileTotalCheck(fileId+seq)){ return false; } } } return true; } //그리드 탭 이동 function fn_tabKendo(e, grid, fromToRow) { e.preventDefault(); var currentNumberOfItems = grid.dataSource.view().length; var row = $(e.target).closest('tr').index(); var col = grid.cellIndex($(e.target).closest('td')); var nowRowLength = grid._data.length; var nowColLength = grid.columns.length; var nowColCount = ""; //심도의 From To가 있으면 columns의 갯수가 변함 if ( fromToRow > 0) { nowColCount = nowColLength + fromToRow; nowColCount = Number(nowColCount); // number로 형변환 } else { nowColCount = nowColLength; nowColCount = Number(nowColCount); // number로 형변환 } // 20200605 숫자입력 탭 set기능 추가 var dataItem = grid.dataItem($(e.target).closest('tr')); // 20201005 ROW 추가시 field 값 에러 수정 //var field = grid.columns[col].field; if (dataItem === undefined){ return; } var field = $(e.target)[0].name; var value = $(e.target).val(); if( !field ) { field = $(e.target)[0].childNodes[1].name; if( String(value).trim() === "" ) { value = $(e.target)[0].childNodes[1].value; } } dataItem.set(field, value); if (row >= 0 && row < currentNumberOfItems && col >= 0 && col < nowColCount) { var nextCellRow; var nextCellCol; if(!e.shiftKey){ nextCellCol = (col + 1) === nowColCount ? 0 : col + 1; } else { nextCellCol = (col - 1) === -1 ? nowColCount - 1: col - 1; } if(!e.shiftKey){ nextCellRow = nextCellCol === 0 ? row + 1 : row; } else { nextCellRow = nextCellCol === nowColCount - 1 ? row - 1 : row; } if(nextCellRow >= currentNumberOfItems || nextCellRow < 0){ return; } // 변경이 완료되면 셀을 닫고 그리드가 다시 바인딩될때까지 기다림 if(!grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")").is('.noneditable')){ // setTimeout(function() { // grid.editCell(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")")); // grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")").select(); // }); grid.editCell(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")")); grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")").select(); } else { while(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")").is('.noneditable')){ !e.shiftKey ? nextCellCol++ : nextCellCol--; if(nextCellCol === nowColCount){ nextCellCol = 0; nextCellRow++; } if(nextCellCol === -1){ nextCellCol = nowColCount - 1; nextCellRow--; } if(nextCellRow >= currentNumberOfItems || nextCellRow < 0){ return; } } grid.editCell(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")")); } } } //그리드 엔터 이동 function fn_enterKendo(e, grid, fromToRow) { e.preventDefault(); var currentNumberOfItems = grid.dataSource.view().length; var row = $(e.target).closest('tr').index(); var col = grid.cellIndex($(e.target).closest('td')); var nowRowLength = grid._data.length; var nowColLength = grid.columns.length; var nowColCount = ""; //심도의 From To가 있으면 columns의 갯수가 변함 if ( fromToRow > 0) { nowColCount = nowColLength + fromToRow; nowColCount = Number(nowColCount); // number로 형변환 } else { nowColCount = nowColLength; nowColCount = Number(nowColCount); // number로 형변환 } // 20200605 숫자입력 엔터키 set기능 추가 var dataItem = grid.dataItem($(e.target).closest('tr')); // 20201005 ROW 추가시 field 값 에러 수정 //var field = grid.columns[col].field; var field = $(e.target)[0].name; var value = $(e.target).val(); if (dataItem === undefined){ return; } dataItem.set(field, value); // 20200615 숫자입력 엔터키 set기능 추가 if (row == 0 || nowRowLength == currentNumberOfItems) { setTimeout(function() { grid.editCell(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")")); }); } if (row >= 0 && row < currentNumberOfItems && col >= 0 && col < nowColCount) { var nextCellRow; var nextCellCol; if(!e.shiftKey){ nextCellCol = col; } if(!e.shiftKey){ nextCellRow = row + 1; } else { nextCellRow = nextCellCol === nowColCount - 1 ? row - 1 : row; } if(nextCellRow >= currentNumberOfItems || nextCellRow < 0){ return; } // 변경이 완료되면 셀을 닫고 그리드가 다시 바인딩될때까지 기다림 if(!grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")").is('.noneditable')){ setTimeout(function() { grid.editCell(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")")); }); } else { while(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")").is('.noneditable')){ !e.shiftKey ? nextCellCol++ : nextCellCol--; if(nextCellCol === nowColCount){ nextCellCol = 0; nextCellRow++; } if(nextCellCol === -1){ nextCellCol = nowColCount - 1; nextCellRow--; } if(nextCellRow >= currentNumberOfItems || nextCellRow < 0){ return; } } grid.editCell(grid.tbody.find("tr:eq(" + nextCellRow + ") td:eq(" + nextCellCol + ")")); } } }