PopoverBuilder

Methods

Actions(System.Action)

Configures the action that defines the PopOver actions and their settings.

Parameters

configurator - System.Action<PopoverActionFactory>

The action that configures the action settings.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .Position(PopoverPosition.Right)
                    .ShowOn(PopoverShowOn.Click)
                    .Actions(action => action.Add().Text("Okay"))
            )
             

Body(System.String)

Defines the template that renders the card body inside the PopOver component.

Parameters

value - System.String

The value that configures the template content.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .Body("Body content")
            )
             

Header(System.String)

Defines a template that renders the card header inside the PopOver component.

Parameters

value - System.String

The value that configures the header.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Header("header contnet")
            )
             

HeaderHandler(System.String)

Defines a JavaScript function that returns the card header inside the PopOver component.

Parameters

handler - System.String

The name of the JavaScript function.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#item")
                    .HeaderHandler("getHeaderContent")
            )
            <script>
                function getHeaderContent(e) {
                  return e.target.text() + " header";
                }
            </script>
             

Height(System.Double)

Defines the height (in pixels) of the PopOver.

Parameters

value - System.Double

The value that configures the height.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .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 boolean value that toggles the functionality.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .ShowOn(PopoverShowOn.Click)
                    .ToggleOnClick(true)
            )
             

Width(System.Double)

Defines the width (in pixels) of the PopOver.

Parameters

value - System.Double

The value that configures the width.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .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

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .Offset(120)
            )
             

Events(System.Action)

Configures the handled client-side events of the PopOver.

Parameters

configurator - System.Action<PopoverEventBuilder>

The action that configures the available events.

Example

Razor
 
             @( Html.Kendo().Popover()
                        .Name("Popover")
                        .Events(events => events
                            .Show("onShow")
                        )
            )
             

Filter(System.String)

Specifies the selector for the elements within the container that displays the PopOver.

Parameters

selector - System.String

The jQuery selector.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
            )
             

Animation(System.Boolean)

Toggles the animation effects of the PopOver.

Parameters

enable - System.Boolean

The boolean that toggles the animations.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .Animation(false)
            )
             

Animation(System.Action)

Configures the animation effects of the PopOver.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action that configures the animation settings.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .Animation(a => a.Open(op => op.Duration(1000)))
            )s
             

ActionsLayout(Kendo.Mvc.UI.PopoverActionLayout)

Defines how the actions buttons will be positioned.

Parameters

value - PopoverActionLayout

The value that configures the position.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .ActionsLayout(PopoverActionsLayout.Center)
            )
             

Position(Kendo.Mvc.UI.PopoverPosition)

Defines the position that is relative to the target element at which the PopOver will be shown.

Parameters

value - PopoverPosition

The value that configures the position.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .Position(PopoverPosition.Center)
            )
             

ShowOn(Kendo.Mvc.UI.PopoverShowOn)

Defines the event when the PopOver will be shown.

Parameters

value - PopoverShowOn

The value that configures the event.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
                    .ShowOn(PopoverShowOn.Click)
            )
             

For(System.String)

Defines the selector that matches the DOM element to which the PopOver will be initialized.

Parameters

selector - System.String

The jQuery selector.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#calendar")
                    .Filter("td a")
            )
             

Body(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines the template that renders the card body inside the Popover component.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Example

Razor
 
            @(Html.Kendo().Popover()
                .For("#item")
                .Body(Html.Kendo().Template()
                    .AddHtml("<span>Body content</span>")
                )
            )
             

BodyHandler(System.String)

Defines a JavaScript function that returns the card body inside the Popover component.

Parameters

handler - System.String

The name of the JavaScript function.

Example

Razor
 
            @(Html.Kendo().Popover()
                    .For("#item")
                    .BodyHandler("getBodyContent")
            )
            <script>
                function getBodyContent(e) {
                  return e.target.text() + " description";
                }
            </script>
             

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

Razor
 
            @(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

Razor
 
            @(@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.

ToHtmlString()

ToClientTemplate()