#113231
admin
Keymaster

Hi Patrick,

We just released a new version. You have an originalEvent parameter in the column click.
Alternatively, the column definition includes a new headerTemplate property which allows you to setup the column’s header after the label template is rendered.

Here’s the code:

` “label”: “Task ID”, allowEdit: false, “dataType”: “number”, “template”: “autoNumber”, width: 150,
labelTemplate: function () {
return “AddID“;
},
headerTemplate: function (header) {
const button = header.querySelector(‘smart-button’);
button.addEventListener(‘pointerdown’, function (event) {
grid.addNewRow();
event.stopPropagation();
});
}`

Hope this helps.

Best regards,
Markov

Smart UI Team
https://www.htmlelements.com/