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

Defines the fluent API for configuring the Telerik UI PopOver for ASP.NET MVC.

Definition

Constructors

Initializes a new instance of the Popover class.

C#
public PopoverBuilder(Popover component)
Parameters:componentPopover

The component.

Methods

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

C#
public PopoverBuilder Actions(Action<PopoverActionFactory> configurator)
Parameters:configuratorAction<PopoverActionFactory>

The action that configures the actions.

Returns:

PopoverBuilder

Defines how the actions buttons will be positioned.

C#
public PopoverBuilder ActionsLayout(PopoverActionLayout value)
Parameters:valuePopoverActionLayout

The value that configures the position.

Returns:

PopoverBuilder

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

Configures the animation effects of the PopOver.

C#
public PopoverBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action that configures the animation settings.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Animation(a =&gt; a.Open(op =&gt; op.Duration(1000)))
)s

Toggles the animation effects of the PopOver.

C#
public PopoverBuilder Animation(bool enable)
Parameters:enablebool

The boolean that toggles the animations.

Returns:

PopoverBuilder

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

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

C#
public PopoverBuilder Body(string value)
Parameters:valuestring

The value that configures the template content.

Returns:

PopoverBuilder

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

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

C#
public PopoverBuilder Body<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#item")
.Body(Html.Kendo().Template()
.AddHtml("&lt;span&gt;Body content&lt;/span&gt;")
)
)

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

C#
public PopoverBuilder BodyHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#item")
.BodyHandler("getBodyContent")
)
&lt;script&gt;
function getBodyContent(e) {
return e.target.text() + " description";
}
&lt;/script&gt;

Configures the handled client-side events of the PopOver.

C#
public PopoverBuilder Events(Action<PopoverEventBuilder> configurator)
Parameters:configuratorAction<PopoverEventBuilder>

The action that configures the available events.

Returns:

PopoverBuilder

Example:
C#
@( Html.Kendo().Popover()
.Name("Popover")
.Events(events =&gt; events
.Show("onShow")
)
)

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

C#
public virtual PopoverBuilder Filter(string selector)
Parameters:selectorstring

The jQuery selector.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
)

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

C#
public PopoverBuilder For(string selector)
Parameters:selectorstring

The jQuery selector.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
)

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

C#
public PopoverBuilder Header(string value)
Parameters:valuestring

The value that configures the header.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Header("header contnet")
)
C#
public PopoverBuilder HeaderHandler(string handler)
Parameters:handlerstringReturns:

PopoverBuilder

Defines the height (in pixels) of the PopOver.

C#
public PopoverBuilder Height(double value)
Parameters:valuedouble

The value that configures the height.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Height(120)
)

Specifies the offset (in pixels) between the PopOver and the anchor. The offset is rendered from the callout arrow.

C#
public PopoverBuilder Offset(double value)
Parameters:valuedouble

The value that configures the offset.

Returns:

PopoverBuilder

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

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

C#
public PopoverBuilder Position(PopoverPosition value)
Parameters:valuePopoverPosition

The value that configures the position.

Returns:

PopoverBuilder

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

Defines the event when the PopOver will be shown.

C#
public PopoverBuilder ShowOn(PopoverShowOn value)
Parameters:valuePopoverShowOn

The value that configures the event.

Returns:

PopoverBuilder

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

Defines a value indicating whether the PopOver will show/hide only when clicking on the target element.

C#
public PopoverBuilder ToggleOnClick(bool value)
Parameters:valuebool

The boolean value that toggles the functionality.

Returns:

PopoverBuilder

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

Defines the width (in pixels) of the PopOver.

C#
public PopoverBuilder Width(double value)
Parameters:valuedouble

The value that configures the width.

Returns:

PopoverBuilder

Example:
C#
@(Html.Kendo().Popover()
.For("#calendar")
.Filter("td a")
.Width(120)
)