Edit List - Button in Webix Jet

Hi,
I have (after defining the Active List Prototype) two buttons in the list (delete and edit) and I want to add a ClickButtonEvent using webix jet.
When I add under
return {
$ui: taskformcomment,
$oninit: function (viewtasks) {
$$(‘delbutton_comment’).attachEvent(“onItemClick”, function(id, e){
var item_id = $$(‘list_comments’).locate(e);
alert(item_id);
//returns id of a list item
})
};
I got the error message: “Cannot read property ‘attachEvent’ of undefined”

How can I reference to the active content buttons?
Thanks!

My ui is:
var taskformcomment = {
{
view: “activeEditList”,
id: “list_comments”,
css: “list_comments”,
minHeight: 600,
scroll: “y”,
“template”: function (obj, common) {
var format = webix.Date.dateToStr("%d.%m.%Y %H:%i");
var html = “

” + obj.mitarbeiter.staff + " kommentierte am " + format(obj.comment_date) + “:”;
html += “
” + common.deleteButton(obj, common) + “
”;
html += “
” + common.editButton(obj, common) + “
”;
html += “
” + obj.comment_text + “
”;
return html;
},
“type”: {
“height”: “auto”
},
select: true,
navigation: true,
activeContent: {
editButton: {
id: “editbutton_comment”,
name: “editbutton_comment”,
view: “button”,
type: ‘icon’,
icon: ‘edit’,
width: 40,
height: 40
},
deleteButton: {
id: “delbutton_comment”,
name: “delbutton_comment”,
view: “button”,
type: ‘icon’,
icon: ‘remove’,
width: 40,
height: 40
}
}
}
}

I can’t help with Jet, but here are two recent discussions about active elements :
known bugs, examples with maksim’s workarounds :

http://forum.webix.com/discussion/5664/datatable-w-activecontent-what-is-common

http://forum.webix.com/discussion/5662/datatable-w-activecontent-how-to-get-the-id-of-the-corresponding-data

Hope this can help.

Hi,

the code you are using seems to be correct. Are you using isolate: “true” for layout? In this case the view should be referred via $$("layout_id").$$("delbutton_comment")