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

Defines the fluent API for configuring TreeListColumnGroupBuilder

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 TreeListFilterableSettingsBuilder<T> class.

C#
public TreeListColumnGroupBuilder(TreeListColumnGroup<T> column)
Parameters:columnTreeListColumnGroup<T>

The column.

Properties

Gets or sets the column.

C#
public TreeListColumnGroup<T> 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>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Html.Kendo().TreeList&lt;OrderViewModel&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>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Kendo().TreeList&lt;OrderViewModel&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>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Kendo().TreeList&lt;OrderViewModel&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>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Html.Kendo().TreeList&lt;OrderViewModel&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>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Kendo().TreeList&lt;OrderViewModel&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:valueboolReturns:

TreeListColumnGroupBuilder<T>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Kendo().TreeList&lt;OrderViewModel&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:valueboolReturns:

TreeListColumnGroupBuilder<T>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Kendo().TreeList&lt;OrderViewModel&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>

Returns the current TreeListColumnGroupBuilder<T> instance.

Example:
C#
@(Kendo().TreeList&lt;OrderViewModel&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:valueboolReturns:

TreeListColumnGroupBuilder<T>

Returns the current TreeListColumnGroupBuilder<T> instance.

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

Sets the title displayed in the header of the column.

C#
public TreeListColumnGroupBuilder<T> Title(string text)
Parameters:textstring

The text.

Returns:

TreeListColumnGroupBuilder<T>

Returns the current TreeListColumnGroupBuilder<T> instance.

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