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

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class TreeListColumnGroupBuilder<T> where T : class

Inheritance: objectTreeListColumnGroupBuilder<T>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the TreeListColumnGroupBuilder<T> class.

C#
public TreeListColumnGroupBuilder(TreeListColumnGroup container, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:containerTreeListColumnGroup

The container.

viewContextViewContexturlGeneratorIUrlGenerator

Properties

Gets or sets the column.

C#
public TreeListColumnGroup Column { get; }
Property Value:

The column.

Methods

The columns configuration for the TreeListColumnGroupBuilder<T>

C#
public TreeListColumnGroupBuilder<T> Columns(Action<TreeListColumnFactory<T>> configurator)
Parameters:configuratorAction<TreeListColumnFactory<T>>

The action defining the configuration.

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Columns(columns =&gt;
{
columns.Add();
})
)

Sets the HTML attributes applied to the header cell of the column.

C#
public TreeListColumnGroupBuilder<T> HeaderHtmlAttributes(IDictionary<string, object> attributes)
Parameters:attributesIDictionary<string, object>

The attributes.

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID).HeaderHtmlAttributes(new {@class="order-header"}))
)

Sets the HTML attributes applied to the header cell of the column.

C#
public TreeListColumnGroupBuilder<T> HeaderHtmlAttributes(object attributes)
Parameters:attributesobject

The attributes.

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID)
.HeaderHtmlAttributes(new {@class="order-header"}))
)

Sets the header template for the column. If sorting is enabled, the template content wrapper must have a k-link CSS class.

C#
public TreeListColumnGroupBuilder<T> HeaderTemplate(string template)
Parameters:templatestring

The string defining the template.

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Html.Kendo().TreeList&lt;UserViewModel&gt;()
.Name("treelist")
.Columns(columns =&gt;
{
columns.Add().HeaderTemplate("HeaderTemplate");
})
)

Hides a column. By default all columns are not hidden. Hidden columns are rendered in the output HTML but are hidden.

C#
public TreeListColumnGroupBuilder<T> Hidden()
Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID)
.Hidden())
)

Makes the column hidden or not. By default all columns are not hidden. Hidden columns are rendered in the output HTML but are hidden.

C#
public TreeListColumnGroupBuilder<T> Hidden(bool value)
Parameters:valuebool

Enables or disables the hidden option

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID)
.Hidden((bool)ViewData["hidden"]))
)

If set to false the column will remain in the side of the grid into which its own locked configuration placed it.

C#
public TreeListColumnGroupBuilder<T> Lockable(bool value)
Parameters:valuebool

Enables or disables the lockable option

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID)
.Lockable((bool)ViewData["lockable"]))
)

Makes the column static. By default all columns are not locked.

C#
public TreeListColumnGroupBuilder<T> Locked()
Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID).Locked())
)

Makes the column static or not. By default all columns are not locked.

C#
public TreeListColumnGroupBuilder<T> Locked(bool value)
Parameters:valuebool

Enables or disables the locked option

Returns:

TreeListColumnGroupBuilder<T>

Example:
C#
@(Kendo().TreeList&lt;UserViewModel&gt;()
.Name("TreeList")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID)
.Locked((bool)ViewData["locked"]))
)
C#
public TreeListColumnGroupBuilder<T> Title(string text)
Parameters:textstringReturns:

TreeListColumnGroupBuilder<T>