PopoverBuilder
Methods
Actions(System.Action)
An array of the action buttons
Parameters
configurator - System.Action<PopoverActionFactory>
The action that configures the actions.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Actions(action => action.Add())
)
Body(System.String)
Defines a kendo template that will be used as the card body inside the popover component.
Parameters
value - System.String
The value that configures the body.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Body("test")
)
Header(System.String)
Defines a kendo template that will be used as the card header inside the popover component.
Parameters
value - System.String
The value that configures the header.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Header("test")
)
Height(System.Double)
The height (in pixels) of the Popover.
Parameters
value - System.Double
The value that configures the height.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Height(120)
)
ToggleOnClick(System.Boolean)
Defines a value indicating whether the popover will show/hide only when clicking on the target element.
Parameters
value - System.Boolean
The value that configures the toggleonclick.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.ToggleOnClick(true)
)
Width(System.Double)
The width (in pixels) of the Popover.
Parameters
value - System.Double
The value that configures the width.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Width(120)
)
Offset(System.Double)
Specifies the offset (in pixels) between the Popover and the anchor. The offset is rendered from the callout arrow.
Parameters
value - System.Double
The value that configures the offset.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Offset(120)
)
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<PopoverEventBuilder>
The client events action.
Example
@( Html.Kendo().Popover()
.Name("Popover")
.Events(events => events
.Show("onShow")
)
)
Filter(System.String)
The selector which to match target child elements for which the Popover will be shown
Parameters
selector - System.String
jQuery selector
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
)
Animation(System.Boolean)
Configures the animation effects of the popover.
Parameters
enable - System.Boolean
Boolean parameter for setting the Animation configuration.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Animation(true)
)
Animation(System.Action)
Configures the animation effects of the popover.
Parameters
animationAction - System.Action<PopupAnimationBuilder>
Configuration parameter for setting the Animation.
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Animation(a => a.Enable(true))
)
ActionsLayout(Kendo.Mvc.UI.PopoverActionLayout)
Defines how the actions buttons will be positioned
Parameters
value - PopoverActionLayout
The value for ActionLayout
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.ActionsLayout(PopoverActionsLayout.Center)
)
Position(Kendo.Mvc.UI.PopoverPosition)
The position that is relative to the target element at which the Popover will be shown.
Parameters
value - PopoverPosition
The value for Position
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
.Position(PopoverPosition.Center)
)
ShowOn(Kendo.Mvc.UI.PopoverShowOn)
Defines when the Popover will be shown.
Parameters
value - PopoverShowOn
The value for ShowOn
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
)
For(System.String)
The selector which to match the DOM element to which the Tooltip widget will be instantiated
Parameters
selector - System.String
jQuery selector
Example
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Position(PopoverPosition.Right)
.ShowOn(PopoverShowOn.Click)
)
Body(Kendo.Mvc.UI.TemplateBuilder)
Parameters
template - TemplateBuilder<TModel>
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.