Search code examples
javascriptjquerykendo-uialertkendo-asp.net-mvc

How do I change the Kendo alert title?


I'm using a Kendo alert and want to change the title of it. The default title is the url name, see link(image) below. I want to use my own title, how do I change this?

Image Kendo alert

The kendo alert:

kendo.alert("mytext");

Solution

  • I found a solution to change the title, I did the following:

    myalert("mytext"); 
    
    function myalert(content) {
        $("<div></div>").kendoAlert({
            title: "mytitle!",
            content: content
        }).data("kendoAlert").open();
    }
    

    Result: Image Kendo alert custom title

    I hope this answer helps a lot of people with the same problem.