{/* Do not edit this file. It is automatically generated by API Documenter. */}


## TemplateEvent

Format used when adding events to elements generated from [TemplateCellRenderer](/refs/Interface/TemplateCellRenderer) or [ColumnObject.template](/refs/Interface/ColumnObject#template){/* */}

**Signature:**

```typescript
export interface TemplateEvent 
```

## Remarks

Selects elements using the given selector and then adds an event.

## Example


```js
column.renderer = {
    type: "html",
    template: `<input type='button' value='click' data-itemindex=\${itemindex}></input>`,
    templateEvents: {
        selector: 'input[type="button"]',
        event: {
            onclick: function(e) {console.log(e)}
        }
    }
}
```

## Properties

|  Property | Type | Description |
| --- | --- | --- |
| [event](/refs/Interface/TemplateEvent#event) | Partial&lt;GlobalEventHandlers&gt; | Event name and method to be executed |
| [selector](/refs/Interface/TemplateEvent#selector) | string | Selector for element |

## Properties Desc

### event

Event name and method to be executed

`Type` - Partial&lt;GlobalEventHandlers&gt;

<hr/>

### selector

Selector for elements

`Type` - string

**Remarks:**

Selects the child elements of the renderer. Use the same selector used for querySelect.

<hr/>
