Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
520
Angular2 - template column with button - event not binding
posted

HI,

I'm trying to add a button in a template column in an IgGrid component in an Angular2 application. I've examined the examples above but can't see how to bind a click event to the button. I've tried an inline template but the click event isn't binding. 

columns: [
   .......

{ key: "Delete", headerText: "", dataType: "string", width: "20%", template: "<button class='btn- btn-primary btn-sm' (click)='deleteRecord(${id})'>Delete</button>" }
]

I couldn't get it working with the JQuery template approach either. just adding an onlick event to the button fires an event but not withint the angular2 component

Can anyone recommend a solution?

Parents Reply Children
No Data