본문으로 건너뛰기

beforeEditStart

설명

셀 편집이 시작되기 전에 발생합니다

사용법

beforeEditStart: (cell: string, value: string) => void | boolean;

매개변수

이벤트의 callback은 다음 매개변수를 받습니다:

  • cell - (필수) 셀의 id
  • value - (필수) 셀의 값

반환값

셀을 편집하려면 true를 반환하고, 편집을 방지하려면 false를 반환합니다

예제

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);

// "beforeEditStart" 이벤트를 구독합니다
spreadsheet.events.on("beforeEditStart", function(cell, value){
console.log("Editing is about to start");
console.log(cell, value);
return true;
});

관련 문서: 이벤트 처리