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

TreeMapBuilder

Methods

AutoBind(System.Boolean)

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Parameters

value - System.Boolean

The value that configures the autobind.

Theme(System.String)

The theme of the TreeMap.

Parameters

value - System.String

The value that configures the theme.

ValueField(System.String)

The data item field which contains the tile value.

Parameters

value - System.String

The value that configures the valuefield.

ColorField(System.String)

The data item field which contains the tile color.

Parameters

value - System.String

The value that configures the colorfield.

TextField(System.String)

The data item field which contains the tile title.

Parameters

value - System.String

The value that configures the textfield.

Template(System.String)

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text..

Parameters

value - System.String

The value that configures the template.

TemplateId(System.String)

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text..

Parameters

value - System.String

The value that configures the template.

TemplateView(System.Web.Mvc.MvcHtmlString)

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text..

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

TemplateHandler(System.String)

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text..

Parameters

value - System.String

The value that configures the template.

Template(Kendo.Mvc.UI.TemplateBuilder)

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text..

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

Colors(System.String[])

The default colors for the TreeMap items (tiles). Can be set to array of specific colors or array of color ranges. For more information on the widget behavior, see the Colors section on the TreeMap Overview page.

Parameters

value - System.String[]

The value that configures the colors.

Type(Kendo.Mvc.UI.TreeMapType)

The layout type for the Treemap.

Parameters

value - TreeMapType

The value that configures the type.

DataSource(System.Action)

Configure the DataSource of the component

Parameters

configurator - System.Action<HierarchicalDataSourceBuilder>

The action that configures the Kendo.Mvc.UI.Fluent.TreeMapBuilder.DataSource(System.Action{Kendo.Mvc.UI.Fluent.HierarchicalDataSourceBuilder{System.Object}}).

Example


             @( Html.Kendo().TreeMap()
                .Name("treeMap")
                .DataSource(dataSource => dataSource
                    .Read(read => read
                        .Action("_PopulationUS", "TreeMap")
                    )
                )
             )

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<TreeMapEventBuilder>

The client events action.

Example


             @( Html.Kendo().TreeMap()
                        .Name("TreeMap")
                        .Events(events => events
                            .DataBound("onDataBound")
                        )
            )

Colors(System.Action)

The default colors for the treemap tiles. When all colors are used, new colors are pulled from the start again.

Parameters

configurator - System.Action<TreeMapColorRangeFactory>

The add action.

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?