PureJS 그리드 동적 header 추가
페이지 정보
작성자 팬더곰 작성일 2023-08-16 14:11 조회 527회 댓글 0건본문
관련링크
안녕하세요.
아래와 같이 그리드 생성한 후 ,버튼을 클릭하면 동적으로 grid header를 추가하는 방법을 문의드립니다.
// create Sum grid
theGridSum = new wijmo.grid.FlexGrid('#theGridSum', {
allowMerging: "All",
columnGroups: getColumnGroupTab1(),
isReadOnly:true,
alternatingRowStep: 0,
selectionMode: wijmo.grid.SelectionMode.MultiRange,
itemsSource: new wijmo.collections.CollectionView([], {
groupDescriptions: []
}),
});
function getColumnGroupTab1() {
...
data.push(
{ header: 'TT1', align:'center',
columns: [
{ header: 'LIPAS', align:'center',
columns: [ { binding:'F', header:'F'}, ]
},
{ header: 'Plan', align:'center',
columns: [
{ binding:'A', header:'Total'},
{ binding:'B', header:'Within LIPAS'},
{ binding:'C', header:'Out of LIPAS'},
{ binding:'D', header:'W GC Contrib'},
{ binding:'E', header:'Next W Contrib'},
]
},
]
},
{ header: 'TT2', align:'center',
columns: [
{ binding: 'G', header: 'G'},
{ binding: 'H', header: 'H'},
{ binding: 'I', header: 'I'},
]
},
);
reutrn data;
);
댓글목록
등록된 댓글이 없습니다.