Reputation: 1167
I need to call a javascript function from a span tag on kendo ui grid. I've implemented as below, but it isn't work. // Kendoui grid
c.Template(m => { }).ClientTemplate(@"<a><span class='k-icon k-i-plus hide-row-grid'></span></a>");
// Javascript
$('.hide-row-grid').click(function () {
alert('hide button click');
});
Please help me resolve it. Thanks
Upvotes: 0
Views: 87
Reputation: 25527
USe event delegation for binding events to dynamically creating objects,
$(document).on("click", ".hide-row-grid", function () {
alert('hide button click');
});
Upvotes: 1