- onCellSelect 이벤트에 클릭한 컬럼 인덱스 저장 로직 구현 - editRow 호출 시 focusField로 클릭한 컬럼 지정
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
var url = '<c:url value="/onl/apim/portalproperty/propertyMan.json" />';
|
||||
var url_view = '<c:url value="/onl/apim/portalproperty/propertyMan.view" />';
|
||||
var lastsel2;
|
||||
var clickedCol; //클릭한 셀의 컬럼 인덱스(포커스 이동용)
|
||||
|
||||
function isValid() {
|
||||
if ($('input[name=prptyGroupName]').val() == "") {
|
||||
@@ -103,6 +104,10 @@
|
||||
},
|
||||
loadComplete: function () {
|
||||
},
|
||||
onCellSelect: function (rowid, iCol) {
|
||||
//onSelectRow보다 먼저 발화 → 클릭한 컬럼 인덱스 저장
|
||||
clickedCol = iCol;
|
||||
},
|
||||
onSelectRow: function (rowid, status) {
|
||||
if (lastsel2 != undefined) {
|
||||
if ($("#grid tr#" + lastsel2).attr("editable") == 1) { //editable=1 means row in edit mode
|
||||
@@ -110,7 +115,8 @@
|
||||
}
|
||||
}
|
||||
$('#grid').restoreRow(lastsel2);
|
||||
$('#grid').editRow(rowid, true);
|
||||
//focusField로 클릭한 셀에 포커스(미지정 시 첫 편집 컬럼으로 감)
|
||||
$('#grid').editRow(rowid, {keys: true, focusField: clickedCol});
|
||||
lastsel2 = rowid;
|
||||
},
|
||||
onSortCol: function () {
|
||||
|
||||
Reference in New Issue
Block a user