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

DialogBuilder

Defines the fluent API for configuring the Kendo Dialog for ASP.NET MVC.

Methods

Actions(System.Action)

A collection of objects containing text, action and primary attributes used to specify the dialog buttons. #### Example

Parameters

configurator - System.Action<DialogActionFactory>

The action that configures the actions.

ButtonLayout(System.String)

Specifies the possible layout of the action buttons in the Dialog.Note: Stretched layout has no effect in browsers, like IE9, that do not support flexbox.Possible values are: normal or stretched.

Parameters

value - System.String

The value that configures the buttonlayout.

Closable(System.Boolean)

Specifies whether a close button should be rendered at the top corner of the dialog.

Parameters

value - System.Boolean

The value that configures the closable.

Messages(System.Action)

Defines the text of the labels that are shown within the dialog. Used primarily for localization.

Parameters

configurator - System.Action<DialogMessagesSettingsBuilder>

The action that configures the messages.

Modal(System.Boolean)

Specifies whether the dialog should show a modal overlay over the page.

Parameters

enabled - System.Boolean

Enables or disables the modal option.

Modal(System.Action)

Specifies whether the dialog should show a modal overlay over the page.

Parameters

configurator - System.Action<DialogModalSettingsBuilder>

The action that configures the modal.

Visible(System.Boolean)

Specifies whether the dialog will be initially visible.

Parameters

value - System.Boolean

The value that configures the visible.

Size(System.String)

Set predefined size to the dialog. The width and height configuration options override the predefined size.Possible values are: auto; small; medium or large.

Parameters

value - System.String

The value that configures the size.

Content(System.String)

The content of the dialog

Parameters

value - System.String

The value that configures the content.

Animation(System.Boolean)

A collection of {Animation} objects, used to change default animations. A value of false will disable all animations in the widget. is not a valid configuration.

Parameters

enabled - System.Boolean

Enables or disables the animation option.

Animation(System.Action)

A collection of {Animation} objects, used to change default animations. A value of false will disable all animations in the widget. is not a valid configuration.

Parameters

configurator - System.Action<PopupAnimationBuilder>

The action that configures the animation.

Title(System.String)

The text in the dialog title bar. If false, the dialog will be displayed without a title bar.

Parameters

value - System.String

The value that configures the visible.

Title(System.Boolean)

Specifies whether the dialog title will be initially visible.

Parameters

show - System.Boolean

The value that configures the visible.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DialogEventBuilder>

The client events action.

Example


             @( Html.Kendo().Dialog()
                        .Name("Dialog")
                        .Events(events => events
                            .Close("onClose")
                        )
            )

Height(System.Double)

Specifies height of the dialog.

Parameters

value - System.Double

The value that configures the height.

Height(System.String)

Specifies height of the dialog.

Parameters

value - System.String

The value that configures the height.

MaxHeight(System.Double)

The maximum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value that configures the maxheight.

MaxHeight(System.String)

The maximum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value that configures the maxheight.

MaxWidth(System.Double)

The maximum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value that configures the maxwidth.

MaxWidth(System.String)

The maximum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value that configures the maxwidth.

MinHeight(System.Double)

The minimum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value that configures the minheight.

MinHeight(System.String)

The minimum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value that configures the minheight.

MinWidth(System.Double)

The minimum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value that configures the minwidth.

MinWidth(System.String)

The minimum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value that configures the minwidth.

Width(System.Double)

Specifies width of the dialog.

Parameters

value - System.Double

The value that configures the width.

Width(System.String)

Specifies width of the dialog.

Parameters

value - System.String

The value that configures the width.

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 Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean)

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>

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();
            )

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?