PureJS 헤더에 체크박스
페이지 정보
작성자 다빈치뷰 작성일 2024-02-16 15:44 조회 78회 댓글 0건본문
관련링크
저 헤더1, 2, 3, 4 문구 앞에 체크박스를 넣어 해당 열을 모두선택/모두해제 기능을 사용하고 싶습니다.
아래의 코드는 그리드를 생성하는 코드입니다.
/**
* 그리드 Column 세팅
*/
function gridOption2() {
let bindColumnInfos = [];
let opt = {};
bindColumnInfos.push({ binding: 'bool1yn', header: '헤더1',width: "*"});
bindColumnInfos.push({ binding: 'bool2yn', header: '헤더2',width: "*"});
bindColumnInfos.push({ binding: 'bool3yn', header: '헤더3',width: "*"});
bindColumnInfos.push({ binding: 'bool4yn', header: '헤더4',width: "*"});
opt.bindColumnInfos = bindColumnInfos;
return opt;
}
/**
* 그리드 생성
* @param data
* @param opt
* @returns
*/
function makeGrid2(data, opt){
// 그리드 초기화
if (GRID2 != null) {
GRID2.dispose();
}
VIEW2 = new wijmo.collections.CollectionView(data, {
trackChanges : true
});
// create some random data
// bind a grid to the raw data
GRID2 = new wijmo.grid.FlexGrid('#grid2', {
allowMerging: 'Cells',
alternatingRowStep: 0,
selectionMode: 'Row',
autoGenerateColumns: false,
//frozenColumns: 3,
columns: opt.bindColumnInfos,
itemsSource: VIEW2,
isReadOnly: false,
headersVisibility :'Column'
});
}
댓글목록
등록된 댓글이 없습니다.