NotificationBuilder
Methods
Position(System.Action)
Configures the position settings of the popup notifications.
Parameters
configurator - System.Action<NotificationPositionSettingsBuilder>
The Position configurator.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Position(p=>p.Pinned(true))
)
Stacking(Kendo.Mvc.UI.NotificationStackingSettings)
Sets the stacking direction when multiple notifications are displayed by a single component instance.
Parameters
value - NotificationStackingSettings
A value of type NotificationStackingSettings enum.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Stacking(NotificationStackingSettings.Down)
)
HideOnClick(System.Boolean)
Sets whether notifications should be hidden by clicking anywhere on their content.
Parameters
value - System.Boolean
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.HideOnClick(true)
)
Button(System.Boolean)
Sets whether notifications should display a hide button (when using default templates only).
Parameters
value - System.Boolean
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Button(true)
)
AllowHideAfter(System.Int32)
Sets the time in milliseconds, after which a notifications can be hidden by the user via clicking.
Parameters
value - System.Int32
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.AllowHideAfter(500)
)
AutoHideAfter(System.Int32)
Sets the time in milliseconds, after which a notifications is hidden automatically.
Parameters
value - System.Int32
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.AutoHideAfter(500)
)
AppendTo(System.String)
Defines a CSS selector, which points to the element that will hold the notifications to be displayed.
Parameters
value - System.String
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.AppendTo("value")
)
Width(System.String)
Defines the width of the notifications to be displayed.
Parameters
value - System.String
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Width("100px")
)
Width(System.Int32)
Defines the width of the notifications to be displayed.
Parameters
value - System.Int32
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Width(200)
)
Height(System.String)
Defines the height of the notifications to be displayed.
Parameters
value - System.String
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Height("100px")
)
Height(System.Int32)
Defines the height of the notifications to be displayed.
Parameters
value - System.Int32
The value of the setting.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Height(100)
)
Templates(System.Action)
Configures the Notification templates.
Parameters
configurator - System.Action<NotificationTemplateFactory>
The configurator representing the Templates settings.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Templates(t=>t.Add().Type("info"))
)
Animation(System.Action)
Configures the animation effects of the displayed notifications.
Parameters
animationAction - System.Action<PopupAnimationBuilder>
The action that configures the animation.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Animation(a=>a.Open(o=>o.Duration(300).SlideIn(SlideDirection.Up)))
)
Events(System.Action)
Configures the client-side events.
Parameters
events - System.Action<NotificationEventBuilder>
The client events action.
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Events(events =>
events.Hide("onHide"))
)
Tag(System.String)
Sets the Notification HTML tag. A SPAN tag is used by default.
Parameters
tag - System.String
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Tag("div")
)
Title(System.String)
Defines the title attribute value for the Notification wrapper.
Parameters
value - System.String
The value for Title
Example
@( Html.Kendo().Notification()
.Name("Notification")
.Title("value")
)
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.