I tried the method in the picture, but it was wrong. How should I write?
You can find a tutorial here:
https://docs.dhtmlx.com/suite/grid__customization.html#addingtemplatetocells
in such case you should use the eventHandlers section:
https://docs.dhtmlx.com/suite/grid__api__grid_eventhandlers_config.html