Skip to main content

on

adds handlers to DOM events of a cell

on?: {[key: string]: any; };

Example

// adds a click event handler to the element of a cellconst layout = new dhx.Layout("layout_container", {    height: "100%",     rows: [        {             html:"<div className='my-element' style='height:100%;width:100%'></div>",             on: {                click: (event) => alert("my-element")            }        },    ]});
// or// adds a click event handler to the element inside a cell by selectorconst layout = new dhx.Layout("layout_container", {    height: "100%",     rows: [        {             html:"<div className='my-element' style='height:100%;width:100%'></div>",             on: {                click: {                    ".my-element": (event) => alert("my-element")                }            }        },    ]});