PureJS grid selector 가 생성되지 않네요..
추천0 비추천 0
페이지 정보
작성자 aarmani 작성일 2023-02-14 18:04 조회 694회 댓글 0건제품 버전 : wijmo-5.20221.842_KR
컨트롤 이름 : wijmo.grid.FlexGrid
본문
첨부파일
관련링크
let view_wperidpage = new wijmo.collections.CollectionView(getData_wperid());
setGroups(true);
let wperidGrid = new wijmo.grid.FlexGrid('#wperidGrid_div', {
deferResizing: true,
showMarquee: true,
alternatingRowStep: 0,
autoGenerateColumns: false,
columns: [
{ binding: 'id', width: '1*', header: 'ID', width: '*', align:"center", format: '*' , isReadOnly: true },
{ binding: 'divinm', width: '1*', header: '부서', width: '*', align:"center", format: '*' , isReadOnly: true },
{
binding: 'wpernm',
width: '1*',
header: '작업자',
align:"center",
cellTemplate: wijmo.grid.cellmaker.CellMaker.makeLink({
text: '<b>${item.wpernm}</b>',
click: (e, ctx) => {
wperidChk(ctx.item.wperid, ctx.item.wpernm , ctx.item.handphone);
}
})
},
{
binding: 'handphone',
width: '2*',
header: '핸드폰',
align:"center",
cellTemplate: wijmo.grid.cellmaker.CellMaker.makeLink({
text: '<b>${item.handphone}</b>',
click: (e, ctx) => {
wperidChk(ctx.item.wperid, ctx.item.wpernm, ctx.item.handphone );
}
})
}
],
itemsSource: view_wperidpage
});
// 선택기 생성
let selector = new wijmo.grid.selector.Selector(wperidGrid, {
itemChecked: () => {
showCheckedCount();
}
});
// 그룹 전환
setGroups(true);
function setGroups(groupsOn) {
let groups = view_wperidpage.groupDescriptions;
groups.clear();
if (groupsOn) {
groups.push(new wijmo.collections.PropertyGroupDescription('divinm'));
}
}
// 헤더 열 전환
setHeaderColumn(true);
function setHeaderColumn(headerOn) {
wperidGrid.headersVisibility = headerOn
? wijmo.grid.HeadersVisibility.All
: wijmo.grid.HeadersVisibility.Column;
selector.column = headerOn
? wperidGrid.rowHeaders.columns[0]
: wperidGrid.columns[0];
}
// 체크된 항목 표시
//showCheckedCount();
function showCheckedCount() {
let cnt = document.getElementById('checked-count'), sel = wperidGrid.rows.filter(r => r.isSelected);
//투입인원
cnt.textContent = sel.length.toString();
console.log(sel.length.toString());
}
// 작업자 데이터 수집
function getData_wperid(){
.
.
.
.
.
}
############
샘플대로 작성해보았는데.. 도무지 selector 가 생성되지 않습니다. 왜 그럴까요?
라이브러리는 첨부이미지와같이 했습니다.
댓글목록
등록된 댓글이 없습니다.