헤더에 버튼 렌더러를 설정한 모습입니다.
헤더의 버튼 렌더러는 클릭 이벤트만 발생 시킬 뿐 독립적인 역할을 합니다.
이 이벤트를 바인딩하여 클릭 시 원하는 메소드를 실행하십시오.
dataField : "col1",
headerText : "Bottom(기본값)",
headerRenderer : { // 헤더 렌더러
type : "ButtonHeaderRenderer",
position : "bottom", // 기본값 bottom
text : "일괄 작업",
onClick : function(event) { // 클릭 핸들러
const rowCount = AUIGrid.getRowCount(event.pid); // 행 개수
const dataField = event.dataField;
// 전체 데이터를 대상으로 값 변경
AUIGrid.updateRowBlockToValue(myGridID, 0, rowCount-1, dataField, "작업 완료");
}
}