KendoDialog button ids

1 Answer 51 Views
Dialog
Sudha
Top achievements
Rank 1
Sudha asked on 29 Oct 2021, 09:05 PM
We have a dialog the dialog has an OK and Cancel button. How can I add button ids for the buttons.

1 Answer, 1 is accepted

Sort by
0
Yanislav
Telerik team
answered on 01 Nov 2021, 09:02 AM

Hi,

Unfortunately there is no way to configure your actions ids, but you can add CSS classes by using the following snippet:

action.Add().Text("MyBTN").CssClass("Mybtn");

And after that you can set the ID for the generated HTML element:

    $(document).ready(function () {
        $(".Mybtn").attr("id", "MyID")
    })

Regards,
Yanislav
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Dialog
Asked by
Sudha
Top achievements
Rank 1
Answers by
Yanislav
Telerik team
Share this question
or