detecting the click event of a button in a grid
New Discussionhow do you detect the click event of a button in a grid row ?
I have this
column.Unbound(“Delete”).Width(“4%”).Template(“<button id=’deleteSite’ type=’button’ class=’btn btn-danger btn-xs’ title=’Delete’><i class=’fa fa-remove’></i></button>”).HeaderText(“”);
then this (just as a test)
$(document).ready(function () {
$("#deleteSite").click( function()
{
alert('delete button clicked');
}
);
});
but the code is never executed, If I specifiy an onclick in the buton definition, it works, but id prefer to detect it with an event listener
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
8 Created On
May 04, 2017 Last Post
8 years, 10 months ago