PureJS 셀 버튼 text 관련
페이지 정보
작성자 다빈치뷰 작성일 2024-01-12 10:59 조회 63회 댓글 0건본문
관련링크
let bindColumnInfos = [];
let opt = {};
bindColumnInfos.push({ binding: 'column1', header: '첫번째',width: "*"});
bindColumnInfos.push({ binding: 'column2', header: '두번째',width: "*"});
bindColumnInfos.push({
binding: 'column3', header: '세번째', width: "*", align: 'center',
cellTemplate: new wijmo.grid.cellmaker.CellMaker.makeLink({
text: '버튼text1 OR 버튼text2'
})
});
opt.bindColumnInfos = bindColumnInfos;
GRID1 = new wijmo.grid.FlexGrid('#grid1', {
alternatingRowStep: 0,
columns: opt.bindColumnInfos,
autoGenerateColumns: false,
isReadOnly: true,
selectionMode: 'Row',
});
위 코드처럼 데이터베이스에서 데이터를 가져와 배열을 선언하고 바인딩 해주는 식입니다.
이렇게 바인딩 해주는 과정에서 저는 column1의 값에 따라 column3의 버튼 텍스트 값을
다르게 하고 싶습니다.
예를 들어
column1 = '01' 이면 버튼텍스트 = '버튼text1'
column1 = '02' 이면 버튼텍스트 = '버튼text2' 이런 식으로 하고 싶습니다.
어떤 방법이 있을까요?
댓글목록
등록된 댓글이 없습니다.