Open lspclass opened 8 years ago
http://codepen.io/thomasJang/pen/reyNPZ 를 참고해주세요.
var fnObj = {
pageStart: function(){
var _this = this;
$("#grid-remove").click(function(){
_this.gridView0.removeList(_this.gridView0.getCheckedList());
});
var list = [
{no: 1, string: "AXGrid 첫번째 줄 입니다."},
{no: 2,string: "AXGrid 두번째 줄 입니다."}
];
this.gridView0.initView(list);
}
}
fnObj.gridView0 = {
target: new AXGrid(),
initView: function(list){
/// 여기에서 colGroup을 변경하면 되겠습니다.
this.target.setConfig({
targetID: "AXGridTarget",
colHeadAlign: "center",
colGroup: [
{key: "no", label: "번호", width: "50", align: "center", formatter: "checkbox"},
{key: "string", label: "String", width: "100", formatter: function(){
return "<b>12</b>"
}}
],
body:{
onclick: function(){
alert(this.c);
console.log(this);
}
}
});
this.setData(list);
},
setData: function(list){
this.target.setList(list);
},
getData: function(){
return this.target.list;
},
getCheckedList: function(){
return this.target.getCheckedList(0);
},
removeList: function(list){
this.target.removeList(list);
}
}
$(document.body).ready(function(){
fnObj.pageStart();
});
{ key:"cnt",label:"댓글여부",width:"100",align:"center", colHeadTool : false }, 이부분을 cnt가 1이냐 0이냐에따라서 보이고 안보이고를 구현하고 싶은데 잘 모르겠습니다. 알려주시면 감사하겠습니다. ㅠ.ㅠ 수고하세요
밑에는 소스입니다...