Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Data Grid › Custom column header and column group header buttons › Reply To: Custom column header and column group header buttons
Hi Patrick,
You can use something like this: ` “columns”: [
{
“label”: “Task ID”, allowEdit: false, “dataType”: “number”, “template”: “autoNumber”, width: 150,
labelTemplate: function () {
return “<smart-button>Add</smart-button><span style=\”margin-left: 20px;\”>ID</span>”;
}
},`
It renders a button inside the column header. Then you can bind to the columnClick event and handle the button click.
Best regards,
Markov
Smart UI Team
https://www.htmlelements.com/