Reputation: 11632
I'm trying to catch click on the "Add new record" button in Kendo Data Grid. I tried to find this in documentation but without luck (I found how to catch click on detail button).
How can i do it please?
I don't want to trigger adding new row but i want to redirect user on new page.
Thanks for any advice.
Upvotes: 1
Views: 2857
Reputation: 8020
try like this,
$('.k-grid-add').on('click',function(){
alert('Hi');
});
Upvotes: 0
Reputation: 6671
You can catch the click on the "Add new record" button using the following code.
$('.k-header').on('click', '.k-grid-add', function() {
alert("Forward to Stackoverflow");
window.location.replace("http://stackoverflow.com");
});
Upvotes: 4