I have an issue with binding the click event to a label in a template.
I’ve posted issue on JSFiddle: http://jsfiddle.net/scornell10/JFTbk/
When you select an item in the DataGrid, it is moved to the ListView.
The ListView uses a template that has a label (with the value of X) that I bind the click event too.
The bind works for 1st or the last selection.
If I select multiple, only the last item in the listView has the click event bind to it. All the others go away.
I’ve used Chrome dev tools and I can see the click event disappear when I add another item.
I can get a workaround by changing the template to:
<label>${Name}</label><label id="${ID}" onClick="onDelete(this);">X</label>
I’d rather bind dynamically as each item is selected.
Any thoughts on why it seems to remove the click handler?
Thanks