이벤트 발생 순서
추가/수정/삭제 및 복사/붙여넣기, 이동과 관련된 여러 Event들을 모아놓은 페이지입니다.
적용된 추가/수정/삭제 이벤트들
gridView.onCopy = function(grid, selection, event) {
addLog("grid.onCopy");
};
gridView.onCurrentChanging = function (grid, oldIndex, newIndex) {
addLog("grid.onCurrentChanging: " + "(" + oldIndex.itemIndex + ", " + oldIndex.column + ") => (" + newIndex.itemIndex + ", " + newIndex.column + ")");
// return false; 를 하는 경우 위치 변경이 되지 않는다.
};
gridView.onCurrentChanged = function (grid, newIndex) {
addLog("grid.onCurrentChanged: " + "(" + newIndex.itemIndex + ", " + newIndex.column + ")");
};
gridView.onCurrentRowChanged = function (grid, oldRow, newRow) {
addLog("grid.onCurrentRowChanged: " + "(" + oldRow + " => " + newRow + ")");
};
gridView.onEditCanceled = function (grid, index) {
addLog("grid.onEditCanceled driven, edit index=" + JSON.stringify(index));
};
gridView.onEditChange = function (grid, index, value) {
addLog("grid.onEditChange driven, " + index.column + ' at ' + index.dataRow + ' was replaced by value: ' + value);
};
gridView.onEditCommit = function (grid, index, oldValue, newValue) {
addLog("grid.onEditCommit driven, " + oldValue + " => " + newValue);
};
gridView.onEditRowChanged = function (grid, itemIndex, dataRow, field, oldValue, newValue) {
var v = grid.getValue(itemIndex, field);
addLog("grid.onEditRowChanged: " + oldValue + " => " + newValue);
};
gridView.onGetEditValue = function (grid, index, editResult) {
addLog("grid.onGetEditValue: " + JSON.stringify(editResult));
};
gridView.onCellEdited = function (grid, itemIndex, row, field) {
addLog("grid.onCellEdited: " + itemIndex + ', ' + field);
}
gridView.onHideEditor = function (grid, index) {
addLog("grid.onHideEditor: " + index.itemIndex + "," + index.column);
};
gridView.onItemEditCancel = function (grid, itemIndex, state) {
addLog("grid.onItemEditCancel: " + state);
//return false; 를 하는 경우 취소 되지 않는다.
};
gridView.onItemEditCanceled = function (grid, itemIndex, state) {
addLog("grid.onItemEditCanceled: " + state);
};
gridView.onPaste = function (grid, index, event){
addLog("grid.Paste");
};
gridView.onPasted = function (grid){
addLog("grid.Pasted");
}
gridView.onEditRowPasted = function (grid, itemIndex, row, fields, oldValues, newValues) {
addLog('grid.onEditRowPasted: {' + newValues.join() + '}');
};
gridView.onRowInserting = function (grid, itemIndex, dataRow) {
addLog("grid.onRowInserting: " + itemIndex);
//추가하지 못하게 하려면 string 메시지나 boolean false를 리턴한다.
return null;
};
gridView.onRowsDeleting = function (grid, rows) {
addLog("grid.onRowsDeleting: " + rows);
//null이 아닌 값을 반환하면 지정 텍스트를 표시하고 삭제를 취소한다.
return null;
};
gridView.onRowsPasted = function (grid, items) {
addLog("grid.onRowsPasted" + items);
};
gridView.onShowEditor = function (grid, index, props, attrs) {
addLog("grid.onShowEditor: " + index.itemIndex + "," + index.column);
};
dataProvider.onDataChanged = function (provider) {
addLog("provider.onDataChanged");
};
dataProvider.onRestoreRows = function (provider, rows) {
addLog('provider.onRestoreRows: ' + rows.join(', '));
};
dataProvider.onRowCountChanged = function (provider, newCount) {
addLog("provider.onRowCountChanged: " + newCount);
};
dataProvider.onRowDeleted = function (provider, row) {
addLog('provider.onRowDeleted: ' + row);
};
dataProvider.onRowDeleting = function (provider, row) {
addLog('provider.onRowDeleting: ' + row);
return true;
};
dataProvider.onRowInserted = function (provider, row) {
addLog("provider.onRowInserted");
};
dataProvider.onRowInserting = function (provider, row, values) {
addLog('provider.onRowInserting: ' + row);
return true;
};
dataProvider.onRowListUpdated = function (provider, rows) {
addLog("provider.onRowListUpdated: " + rows.join(', '));
};
dataProvider.onRowMoved = function (provider, row) {
addLog("provider.onRowMoved: " + row + ' to ' + newRow);
};
dataProvider.onRowMoving = function (provider, row, newRow) {
addLog("provider.onRowMoving: " + row + ' to ' + newRow);
return true;
};
dataProvider.onRowsDeleted = function (provider, rows) {
addLog("provider.onRowsDeleted: " + rows.join(', '));
};
dataProvider.onRowsInserted = function (provider, row, count) {
addLog("provider.onRowsInserted: " + count + " rows inserted!");
};
dataProvider.onRowsMoved = function (provider, row, count, newRow) {
addLog('provider.onRowsMoved: ' + count + ' rows moved');
};
dataProvider.onRowStateChanged = function (provider, row) {
addLog('provider.onRowStateChanged: ' + row);
};
dataProvider.onRowStatesChanged = function (provider, rows) {
addLog('provider.onRowStatesChanged: ' + rows.join(','));
};
dataProvider.onRowStatesCleared = function (provider) {
addLog('provider.onRowStatesCleared');
};
dataProvider.onRowsUpdated = function (provider, row, count) {
addLog('provider.onRowsUpdated');
};
dataProvider.onRowUpdated = function (provider, row) {
addLog("provider.onRowUpdated: " + row);
};
dataProvider.onRowUpdating = function (provider, row) {
addLog("provider.onRowUpdating: " + row);
return true;
};
dataProvider.onValueChanged = function (provider, row, field) {
addLog('provider.onValueChanged: ' + row + ' row, ' + field + ' fieldIndex');
};
레벨, 메시지, 에러 상태 등에 대해서는 셀 Validation을 참조하세요.