New to Telerik UI for ASP.NET MVC? Download free 30-day trial

NotificationTemplateBuilder

Methods

Type(System.String)

Sets the notification type (i.e. template name). The value should be a valid Javascript identifier.

Parameters

value - System.String

The type of the notification popup.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add().Type("info"))
            )

ClientTemplateID(System.String)

Sets the client ID of the notification template.

Parameters

value - System.String

The id of the kendo template script.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add().ClientTemplateID("template-id"))
            )

ClientTemplate(System.String)

Sets the Kendo UI template to be used for the notifications.

Parameters

value - System.String

The content of the notification template.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add().ClientTemplate("template"))
            )

ClientTemplateView(System.Web.Mvc.MvcHtmlString)

Sets the Kendo UI template to be used for the notifications.

Parameters

template - System.Web.Mvc.MvcHtmlString

The partial view representing the template.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add().ClientTemplateView(Html.Partial("templateView")))
            )

ClientTemplateHandler(System.String)

Sets the Kendo UI template to be used for the notifications.

Parameters

template - System.String

The name of the template handler function.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add().ClientTemplateHandler("handler"))
            )

ClientTemplate(Kendo.Mvc.UI.TemplateBuilder)

Sets the Kendo UI template to be used for the notifications.

Parameters

template - TemplateBuilder<TModel>

The content defined using the Telerik UI Template component.

Example


             @( Html.Kendo().Notification()
                        .Name("Notification")
                        .Templates(t=>t.Add()
                            .ClientTemplate(Html.Kendo()
                                .Template()
                                .AddHtml("<p>template</p>")
                             )
                        )
            )

In this article
Not finding the help you need?