How to get the ID of a webix element ?

webix.ui({ view:“button”, id:“button1”, value:“Button”, type:“base”, inputWidth:100 })

How to get the id of the button ?
I tried document.getElementById(“button1”). but it is not working

AFAIK webix does not set id to html element.
webix sets view_id attribute instead of id.
if you need to find the node then use $$("button1").getNode().

If you want to get only the button, you can use this code:
$$(“button1”).getInputNode()

It returns a HTML button.

I’m actually trying to get the Webix ID of a specific element, a subview, which appears multiple times (in each row of a Datatable). How can I do that from onItemClick?

For that case you can use a more reliable onSubViewOpen event (with delay, to let the subview initialize on first opening) and get the subview id as:

this.getSubView(id).config.id 

https://snippet.webix.com/wm1j6kgv