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
200
Angular2 custom column template - call function + update UI
posted

Hi,

I'm using a column template to conditionally show some buttons to the user.

The 2 issues I have:

1. How to call a function on my angular2 component, passing in a value from that row?

Currently I have found a way, involving hidden input elements, but I'm sure there must be a more elegant way to handle this.

2. When I click one of the buttons, it updates a boolean property of the object behind that row, but the column template isn't updated accordingly.

Attached you can find a sample I've created starting from https://github.com/IgniteUI/igniteui-angular2/tree/master/samples/igGrid.

Steps to reproduce:

1. click the Add' button

2. click "Publish" or "Unpublish" on one of the records

Thanks in advance for your answer.

Archive.zip