var columns = [
{
field: "first",
label: "First Name",
formatter:function(data,object){
console.log(data);
console.log(object);
return "<input type='button' value='test'></input>";
}

},
{
field: "last",
label: "Last Name"
},
{
field: "age",
label: "Age"
}
];

var grid = new CustomGrid({
columns:columns,
selectionMode: "single",
indirectSeletion:true,// for Selection; only select a single row at a time
cellNavigation: false // for Keyboard; allow only row-level keyboard navigation
}, "cartgrid");

 

或者

 

renderCell:function (object, data, cell) {
console.log("渲染");
var o = document.createElement("input"); //使用DOM的创建元素方法
o.type = "check" ; //设置元素的类型
o.value = "按钮" ; //设置元素的值
// document.body.appendChild(o);
return o;
}

相关文章:

  • 2021-09-17
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2022-02-23
  • 2021-05-31
  • 2021-07-23
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
相关资源
相似解决方案