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

Adding PopOver to MVC Kendo Button

2 Answers 160 Views
Button
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 20 Dec 2019, 01:58 PM
How do you add a PopOver to a Kendo Button when using the MVC wrapper, will not let me add 'data-toggle' and 'data-content' to HtmlAttributes, if anyone has an example it would be appreciated, thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Misho
Telerik team
answered on 24 Dec 2019, 08:19 AM

Hi,

You need to apply the data attributes to HtmlAttributes using underscore, for example:

    .HtmlAttributes(new { type = "button", data_content="My Content", data_toggle="popover"})

This is also valid for the ASP.NET MVC Html helpers in general:

https://stackoverflow.com/questions/4844001/html5-data-with-asp-net-mvc-textboxfor-html-attributes

Best Regards,
Misho
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
0
Peter
Top achievements
Rank 1
answered on 02 Jan 2020, 10:06 AM
Thank you Misho, was not aware we could use underscore '_' instead of a dash '-', works a treat, much appreciated.
Tags
Button
Asked by
Peter
Top achievements
Rank 1
Answers by
Misho
Telerik team
Peter
Top achievements
Rank 1
Share this question
or