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

BadgeBuilder

Methods

CutoutBorder(System.Boolean)

Specifies wether or not to render additional "cutout" border around the badge.

Parameters

value - System.Boolean

The value that configures the cutoutborder.

Icon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the badge by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.

Parameters

value - System.String

The value that configures the icon.

Max(System.Double)

If text is a number, it will cap that number.

Parameters

value - System.Double

The value that configures the max.

Template(System.String)

The template which renders the content of the badge.

Parameters

value - System.String

The value that configures the template.

TemplateId(System.String)

The template which renders the content of the badge.

Parameters

value - System.String

The value that configures the template.

TemplateView(System.Web.Mvc.MvcHtmlString)

The template which renders the content of the badge.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

TemplateHandler(System.String)

The template which renders the content of the badge.

Parameters

value - System.String

The value that configures the template.

Template(Kendo.Mvc.UI.TemplateBuilder)

The template which renders the content of the badge.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Text(System.String)

The text of the badge. Valid input includes string, number or object with toString method. Default is empty string.

Parameters

value - System.String

The value that configures the text.

Visible(System.Boolean)

If set to false the badge will not be displayed.

Parameters

value - System.Boolean

The value that configures the visible.

Size(Kendo.Mvc.UI.BadgeSize)

Defines the size of the badge

Parameters

value - BadgeSize

The value that configures the size.

Align(Kendo.Mvc.UI.BadgeAlign)

Defines the alignment of the badge

Parameters

value - BadgeAlign

The value that configures the align.

Position(Kendo.Mvc.UI.BadgePosition)

Defines the position of the badge

Parameters

value - BadgePosition

The value that configures the position.

Rounded(Kendo.Mvc.UI.Rounded)

Defines the rounded appearance of the badge

Parameters

value - Rounded

The value that configures the rounding of the badge.

ThemeColor(Kendo.Mvc.UI.BadgeColor)

Defines the color of the badge

Parameters

value - BadgeColor

The value that configures the themecolor.

FillMode(Kendo.Mvc.UI.BadgeFill)

Defines how theme colors are applied to a badge

Parameters

value - BadgeFill

The value that configures the fill mode.

Text(System.Single)

The text of the badge. Valid input includes string, number or object with toString method. Default is empty string.

Parameters

value - System.Single

The value that configures the text.

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?