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

ChipBuilder

Methods

Icon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the chip 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.

IconClass(System.String)

If set, value will be appended to the icon's element class attribute.

Parameters

value - System.String

The value that configures the iconclass.

AvatarClass(System.String)

If set, value will be appended to the icon's element class attribute. It also appends "k-chip avatar" and "k-avatar" classes to the icon's element.

Parameters

value - System.String

The value that configures the avatarclass.

RemoveIcon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content for the remove button when removable=true. The icon is rendered inside the chip 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 removeicon.

RemoveIconClass(System.String)

If set, value will be appended to the remove icon's element class attribute.

Parameters

value - System.String

The value that configures the removeiconclass.

Label(System.String)

The label text of the chip. Default is empty string.

Parameters

value - System.String

The value that configures the label.

Removable(System.Boolean)

Specifies if the Chip will be removable or not. If the property is set to true, the Chip renders a remove icon.

Parameters

value - System.Boolean

The value that configures the removable.

Selectable(System.Boolean)

Sets whether the Chip can be selected.

Parameters

value - System.Boolean

The value that configures the selectable.

Selected(System.Boolean)

Toggles the selected state of the Chip.

Parameters

value - System.Boolean

The value that configures the selected.

Enabled(System.Boolean)

Toggles the enabled state of the Chip.

Parameters

value - System.Boolean

The value that configures the enabled.

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component.

Parameters

value - ComponentSize

The value that configures the size.

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius.

Parameters

value - Rounded

The value that configures the rounded.

FillMode(Kendo.Mvc.UI.ChipFillMode)

Sets a value controlling how the color is applied.

Parameters

value - ChipFillMode

The value that configures the fillmode.

ThemeColor(Kendo.Mvc.UI.ChipThemeColor)

Sets the color of the component according to the applied theme.

Parameters

value - ChipThemeColor

The value that configures the themecolor.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<ChipEventBuilder>

The client events action.

Example


            @(Html.Kendo().Chip()
                        .Name("Chip")
                        .Events(events => events
                            .Click("onClick")
                        )
            )

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?