我也是要自定义groupheade。我的写法是
self.theGrid.formatItem.addHandler(function (s, e) {
if (e.panel == s.cells && s.rows[e.row] instanceof wj.grid.GroupRow && e.col === 0) {
var html = e.cell.innerHTML;
html = html.replace(/Rowname:/,"").replace(/\(.*?\)/,"");
if(self.browser === '2'){
if(self.canEdit){
html += `<div class="add_staff_button" style="display: contents;">+</div>`;
}else{
html += `<div class="add_staff_button display_none">+</div>`;
}
}
e.cell.innerHTML = html;
}
}); |