This is a migrated thread and some comments may be shown as answers.

cancel action in listview

1 Answer 78 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 17 Mar 2012, 07:49 AM
Hi,
I have a listview that contains anchors in  a template.
 
template: "<a href='details.aspx?id=${data.id}'>${data.subject}</a>"

I know that you can trap the "click" event & I want to be able to trap the event to see if the id event is -1 and stop the transfer.

Is there a "canel" property or is there another way to stop the transfer to another page on a certain condition?

regards
Roger

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 19 Mar 2012, 08:48 AM
Hello Roger,

preventDefault is what you need in order to prevent default browser action inside the click handler.

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
Roger
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or