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

OrgChartBuilder

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

Methods

Editable(System.Boolean)

If set to false, the user will not be able to edit the data to which the OrgChart is bound. By default, editing is enabled.The editable option can also be set to a JavaScript object (which represents the editing configuration).

Parameters

enabled - System.Boolean

Enables or disables the editable option.

Editable(System.Action)

If set to false, the user will not be able to edit the data to which the OrgChart is bound. By default, editing is enabled.The editable option can also be set to a JavaScript object (which represents the editing configuration).

Parameters

configurator - System.Action<OrgChartEditableSettingsBuilder>

The action that configures the editable.

GroupField(System.String)

Specifies the field the nodes should be grouped by. If any value is passed, the OrgChart uses its grouping rendering mode.

Parameters

value - System.String

The value that configures the groupfield.

GroupHeaderTemplate(System.String)

Provides an option to customize the default template for the group label (using the field value and name by default).

Parameters

value - System.String

The value that configures the groupheadertemplate.

GroupHeaderTemplateId(System.String)

Provides an option to customize the default template for the group label (using the field value and name by default).

Parameters

value - System.String

The value that configures the groupheadertemplate.

Messages(System.Action)

Provides configuration options for the messages present in the OrgChart widget.

Parameters

configurator - System.Action<OrgChartMessagesSettingsBuilder>

The action that configures the messages.

Template(System.String)

Defines a node card template.

Parameters

value - System.String

The value that configures the template.

TemplateId(System.String)

Defines a node card template.

Parameters

value - System.String

The value that configures the template.

CardsColors(System.String[])

Parameters

value - System.String[]

DataSource(System.Action)

The data source of the widget which is used to render the OrgChart items. Can be a JavaScript object which represents a valid kendo.data.OrgChartDataSource configuration, a JavaScript array, or an existing kendo.data.OrgChartDataSource instance. If the dataSource option is set to a JavaScript object or an array, the widget will initialize a new kendo.data.OrgChartDataSource instance and will use that value as the DataSource configuration. or If the dataSource option is an existing kendo.data.OrgChartDataSource instance, the widget will use that instance and will not initialize a new one..

Parameters

configurator - System.Action<OrgChartAjaxDataSourceBuilder>

DataSource(System.String)

Parameters

dataSourceId - System.String

BindTo(System.Collections.IEnumerable)

Parameters

data - System.Collections.IEnumerable

BindTo(System.Collections.Generic.IEnumerable)

Parameters

data - System.Collections.Generic.IEnumerable<T>

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<OrgChartEventBuilder>

The client events action.

Example


             @( Html.Kendo().OrgChart()
                        .Name("OrgChart")
                        .Events(events => events
                            .Cancel("onCancel")
                        )
            )

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?