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

AvatarBuilder

Methods

Alt(System.String)

A text description of the Avatar image. When type="image" is configured this value will be used to populate the alt attribute of the <img> element.

Parameters

value - System.String

The value that configures the alt.

Border(System.Boolean)

Specifies whether the avatar should render border around its container element. Default is false.

Parameters

value - System.Boolean

The value that configures the border.

ClassName(System.String)

Adds additional custom classes to the Avatar container element.

Parameters

value - System.String

The value that configures the classname.

Icon(System.String)

Specifies an icon name to be used if the avatar type is set to icon. For a list of available icon names, please refer to the Web Font Icons article.

Parameters

value - System.String

The value that configures the icon.

Image(System.String)

Specifies an image URL or dataURL that would be used to populate the src attribute of the avatar <img> element.

Parameters

value - System.String

The value that configures the image.

Text(System.String)

Will be used to populated Avatar content when its type is set to text

Parameters

value - System.String

The value that configures the text.

Style(System.Collections.Generic.IDictionary)

Sets additional CSS styles to the Avatar container element.

Parameters

value - System.Collections.Generic.IDictionary<String,Object>

The value that configures the style.

FillMode(Kendo.Mvc.UI.AvatarFillMode)

Specifies the appearance fill style of the Avatar. The available values are "outline", "solid" (default), and null.

Parameters

value - AvatarFillMode

The value that configures the fillmode.

Rounded(Kendo.Mvc.UI.Rounded)

Could be one of the predefined shapes available for the widget container: "circle" (default), "small", "medium", "large", or null.

Parameters

value - Rounded

The value that configures the rounded.

Size(Kendo.Mvc.UI.ComponentSize)

The Avatar allows you to set predefined sizes. The available size values are "small", "medium" (default), "large", or null.

Parameters

value - ComponentSize

The value that configures the size.

ThemeColor(Kendo.Mvc.UI.ThemeColor)

The Avatar allows you to specify predefined theme colors for background of its container. The available themeColor values are: - primary (Default) - Applies coloring based on primary theme color. - base - Applies base theme color. - secondary - Applies coloring based on secondary theme color. - tertiary - Applies coloring based on tertiary theme color. - inherit - Applies inherited coloring value. - info - Applies coloring based on info theme color. - success - Applies coloring based on success theme color. - warning - Applies coloring based on warning theme color. - error - Applies coloring based on error theme color. - dark - Applies coloring based on dark theme color. - light - Applies coloring based on light theme color. - inverse - Applies coloring based on inverted theme color. - null - Does not apply theme color class.

Parameters

value - ThemeColor

The value that configures the themecolor.

Type(Kendo.Mvc.UI.AvatarType)

Could be one of the three predefined types for the widget: icon, image, or text (default).

Parameters

value - AvatarType

The value that configures the type.

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>

AsChildComponent()

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?