onButtonClick (event)
Button속성 값이 Button, Html
일 때 셀 내 사이드 버튼을 클릭하는 경우 호출되는 이벤트입니다.
Button이 설정된 셀이 편집 불가능한 경우 버튼 클릭 뿐만 아니라 셀 내부를 클릭 시 이 이벤트가 호출됩니다.
해당 이벤트는 사이드에 위치한 버튼(
)에 한정되며, Type
을 버튼으로 하는 형태(
)에서는 onClick 을 통해 버튼 클릭에 대한 로직을 구성하셔야 합니다.
1(true)
를 리턴 시, 버튼에 대한 기본 동작이 무시됩니다.
Syntax
onButtonClick : function(paramObject) {
}
or
sheet.bind("onButtonClick" , function(paramObject) {});
Parameters
Name |
Type |
Description |
sheet |
object |
시트 객체 |
row |
object |
셀이 위치한 데이터 로우 객체 |
col |
string |
셀의 열이름 |
x |
number |
버튼 내에서 마우스 클릭 x좌표 |
y |
number |
버튼 내에서 마우스 클릭 y좌표 |
Example
options.Cols = [
{
Header : "아이디",
Name: "sId",
Type: "Text",
Button: "Button",
ButtonText: "중복확인",
WidthPad: 100
} ...
]
options.Events = {
onButtonClick:function(evtParam){
if (evtParam.col == "sId") {
var value = evtParam.row[evtParam.col];
var r = evtParam.sheet.getFirstRow();
while (r) {
if (r != evtParam.row && r[evtParam.col] == value) {
alert("같은 아이디가 있습니다. 다른 아이디를 입력하세요");
break;
}
r = r.nextSibling;
}
}
}
}
Read More
Since
product |
version |
desc |
core |
8.0.0.0 |
기능 추가 |