How do I add preventDefault to TelerikButton

1 Answer 280 Views
Form
Aaron
Top achievements
Rank 1
Aaron asked on 11 Apr 2024, 08:50 PM

I have a button inside of a form that I need to prevent from submitting the form when clicked. How can I add the following to a TelerikButton?

@onclick:preventDefault="true"

@onclick:stopPropagation="true"

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Apr 2024, 02:51 PM

Hi Aaron,

It's a lot easier to set the ButtonType to Button.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Tags
Form
Asked by
Aaron
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or