Question
· Dec 8, 2017

Column onclick event

I set column onclick event, but it is not working

col = ##class(%ZEN.Auxiliary.column).%New()
col.header = "Header"
col.colName = "Data3"
col.onclick = "alert('ok');"

D table.%AddColumn(col)

 

alert Ok is not show

What is wrong?

Discussion (1)0
Log in or sign up to continue

check side conditions of the related column.

from docs:

property onclick as %ZEN.Datatype.eventHandler;
onclick event handler: This event is fired when the mouse is clicked within a cell in this column. If the column does not have data associated with it you will have to set the linkCaption property.
Note that this callback is called before the new row in the table is selected so you will not have the current selectedIndex for the table when this callback is fired. If you need that, use the tablePane's onselectrow callback.