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

Provides a fluent interface for configuring notification templates.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class NotificationTemplateBuilder

Inheritance: objectNotificationTemplateBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public NotificationTemplateBuilder(NotificationTemplateSettings templateSettings)
Parameters:templateSettingsNotificationTemplateSettings

Methods

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

C#
public NotificationTemplateBuilder ClientTemplate(string value)
Parameters:valuestring

The content of the notification template.

Returns:

NotificationTemplateBuilder

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

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

C#
public NotificationTemplateBuilder ClientTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The content defined using the Telerik UI Template component.

Returns:

NotificationTemplateBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=&gt;t.Add()
.ClientTemplate(Html.Kendo()
.Template()
.AddHtml("&lt;p&gt;template&lt;/p&gt;")
)
)
)

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

C#
public NotificationTemplateBuilder ClientTemplateHandler(string template)
Parameters:templatestring

The name of the template handler function.

Returns:

NotificationTemplateBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=&gt;t.Add().ClientTemplateHandler("handler"))
)

Sets the client ID of the notification template.

C#
public NotificationTemplateBuilder ClientTemplateID(string value)
Parameters:valuestring

The id of the kendo template script.

Returns:

NotificationTemplateBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=&gt;t.Add().ClientTemplateID("template-id"))
)

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

C#
public NotificationTemplateBuilder ClientTemplateView(MvcHtmlString template)
Parameters:templateMvcHtmlString

The partial view representing the template.

Returns:

NotificationTemplateBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=&gt;t.Add().ClientTemplateView(Html.Partial("templateView")))
)

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

C#
public NotificationTemplateBuilder Type(string value)
Parameters:valuestring

The type of the notification popup.

Returns:

NotificationTemplateBuilder

Example:
C#
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=&gt;t.Add().Type("info"))
)