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

The base class for all columns in Kendo Grid for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public abstract class GridColumnBase<T> : JsonObject, IGridColumn where T : class

Inheritance: objectJsonObjectGridColumnBase<T>

Derived Classes: GridActionColumn<T>GridBoundColumn<TModel, TValue>GridColumnGroup<T>GridPinColumn<T>GridSelectColumn<T>GridTemplateColumn<T>...

Implements: IGridColumn

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

Constructors

C#
protected GridColumnBase(Grid<T> grid)
Parameters:gridGrid<T>

Properties

The template which renders the footer table cell for the column. The fields which can be used in the template are: Average - the value of the "average" aggregate (if specified) Count - the value of the "count" aggregate (if specified) Max - the value of the "max" aggregate (if specified) Min - the value of the "min" aggregate (if specified) Sum - the value of the "sum" aggregate (if specified) Data - provides access to all available aggregates

C#
public string ClientFooterTemplate { get; set; }

Implements: IGridColumn.ClientFooterTemplate

C#
public string ClientFooterTemplateHandler { get; set; }

Implements: IGridColumn.ClientFooterTemplateHandler

The template which renders the group footer for the corresponding column. By default the group footer is not displayed. The group footer will always appear as long as at least one column has a defined groupFooterTemplate. The fields which can be used in the template are:

Razor
average - the value of the "average" aggregate (if specified)
count - the value of the "count" aggregate (if specified)
max - the value of the "max" aggregate (if specified)
min - the value of the "min" aggregate (if specified)
sum - the value of the "sum" aggregate (if specified)
data - provides access to all available aggregates, e.g. data.fieldName1.sum or data.fieldName2.average
group - provides information for the current group. An object with three fields - field, value and items. items field contains the data items for current group. Returns groups if the data items are grouped (in case there are child groups)      ///
C#
public string ClientGroupFooterTemplate { get; set; }

Implements: IGridColumn.ClientGroupFooterTemplate

C#
public string ClientGroupFooterTemplateHandler { get; set; }

Implements: IGridColumn.ClientGroupFooterTemplateHandler

The template which renders the column content. The grid renders table rows (<tr>) which represent the data source items. Each table row consists of table cells (<td>) which represent the grid columns. By default the HTML-encoded value of the field is displayed in the column.

C#
public string ClientTemplate { get; set; }

Implements: IGridColumn.ClientTemplate

C#
public string ClientTemplateHandler { get; set; }

Implements: IGridColumn.ClientTemplateHandler

If set to false the column menu will not be rendered for the specific column.

C#
public virtual bool ColumnMenu { get; set; }

Implements: IGridColumn.ColumnMenu

If set to true a draghandle will be rendered and the user could reorder the rows by dragging the row via the drag handle. If the selectable option is enabled for rows only selected rows will can be dragged and reordered.

C#
public virtual bool Draggable { get; set; }

Implements: IGridColumn.Draggable

Html editor.

C#
public string EditorHtml { get; set; }

If set to true the column value will be HTML-encoded before it is displayed. If set to false the column value will be displayed as is. By default the column value is HTML-encoded.

C#
public virtual bool Encoded { get; set; }

Implements: IGridColumn.Encoded

Specifying the column should be exported and the export settings.

C#
public GridColumnExportableSettings Exportable { get; set; }

Implements: IGridColumn.Exportable

Gets the footer HTML attributes.

C#
public IDictionary<string, object> FooterHtmlAttributes { get; }
Property Value:

The footer HTML attributes.

Implements: IGridColumn.FooterHtmlAttributes

Gets the footer template of the column.

C#
public HtmlTemplate<GridAggregateResult> FooterTemplate { get; set; }

Implements: IGridColumn.FooterTemplate

The column format.

C#
public string Format { get; set; }

Gets or sets the grid.

C#
public Grid<T> Grid { get; }
Property Value:

The grid.

Gets the header HTML attributes.

C#
public IDictionary<string, object> HeaderHtmlAttributes { get; }
Property Value:

The header HTML attributes.

Implements: IGridColumn.HeaderHtmlAttributes

Gets/Sets the header template of the column.

C#
public HtmlTemplate HeaderTemplate { get; set; }

Implements: IGridColumn.HeaderTemplate

Gets or sets a value indicating whether this column is hidden.

C#
public virtual bool Hidden { get; set; }
Property Value:

true if hidden; otherwise, false.

Implements: IGridColumn.Hidden

Hidden columns are output as HTML but are not visible by the end-user.

Gets the HTML attributes of the cell rendered for the column

C#
public IDictionary<string, object> HtmlAttributes { get; }
Property Value:

The HTML attributes.

Implements: IGridColumn.HtmlAttributes

The html attributes handler.

C#
public string HtmlAttributesHandler { get; set; }
Property Value:

The handler name.

Implements: IGridColumn.HtmlAttributesHandler

If set to true the column will be visible in the grid column menu. By default the column menu includes all data-bound columns (ones that have their field set).

C#
public virtual bool IncludeInMenu { get; set; }

Implements: IGridColumn.IncludeInMenu

The function that generates the inline template.

C#
public virtual Func<T, object> InlineTemplate { get; set; }

Returns 'true' if the column is last and 'false' if it's not.

C#
public bool IsLast { get; }

Implements: IGridColumn.IsLast

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

C#
public virtual bool Lockable { get; set; }

Implements: IGridColumn.Lockable

If set to true the column will be displayed as locked (frozen) in the grid.

C#
public virtual bool Locked { get; set; }

Implements: IGridColumn.Locked

Sets the condition that needs to be satisfied for a column to remain visible.

C#
public string Media { get; set; }

Implements: IGridColumn.Media

Gets the member of the column.

C#
public string Member { get; set; }
Property Value:

The member.

The pixel screen width below which the user will not be able to resize the column via the UI.

C#
public int MinResizableWidth { get; set; }

Implements: IGridColumn.MinResizableWidth

The pixel screen width below which the column will be hidden. The setting takes precedence over the hidden setting, so the two should not be used at the same time.

C#
public int MinScreenWidth { get; set; }

Implements: IGridColumn.MinScreenWidth

If set to false the column will become non-resizable, while all the other columns remaining resizable in the grid component. In order for this property to work, grid's resizable property must be set to true

C#
public virtual bool Resizable { get; set; }

Implements: IGridColumn.Resizable

C#
public bool ShouldEncodeFooterHtmlAttributes { get; set; }

Implements: IGridColumn.ShouldEncodeFooterHtmlAttributes

C#
public bool ShouldEncodeHeaderHtmlAttributes { get; set; }

Implements: IGridColumn.ShouldEncodeHeaderHtmlAttributes

C#
public bool ShouldEncodeHtmlAttributes { get; set; }

Implements: IGridColumn.ShouldEncodeHtmlAttributes

If set to true the user will be able to stick or unstick the column from the column menu.

C#
public virtual bool Stickable { get; set; }

Implements: IGridColumn.Stickable

If set to true the column will be displayed as sticky in the grid.

C#
public virtual bool Sticky { get; set; }

Implements: IGridColumn.Sticky

Gets the template of the column.

C#
public virtual Action<T> Template { get; set; }

Gets or sets the title of the column.

C#
public virtual string Title { get; set; }
Property Value:

The title.

Implements: IGridColumn.Title

Gets or sets a value indicating whether this column is visible.

C#
public virtual bool Visible { get; set; }
Property Value:

true if visible; otherwise, false. The default value is true.

Implements: IGridColumn.Visible

Invisible columns are not output in the HTML.

Gets or sets the width of the column.

C#
public string Width { get; set; }
Property Value:

The width.

Implements: IGridColumn.Width

Methods

C#
protected void AppendHeaderContent(IHtmlNode container)
Parameters:containerIHtmlNode

Creates the Display Builder.

C#
public virtual IGridDataCellBuilder CreateDisplayBuilder(IGridHtmlHelper htmlHelper)
Parameters:htmlHelperIGridHtmlHelperReturns:

IGridDataCellBuilder

Implements: IGridColumn.CreateDisplayBuilder(IGridHtmlHelper)

C#
protected virtual IGridDataCellBuilder CreateDisplayBuilderCore(IGridHtmlHelper htmlHelper)
Parameters:htmlHelperIGridHtmlHelperReturns:

IGridDataCellBuilder

Creates the Edit Builder.

C#
public IGridDataCellBuilder CreateEditBuilder(IGridHtmlHelper htmlHelper)
Parameters:htmlHelperIGridHtmlHelperReturns:

IGridDataCellBuilder

Implements: IGridColumn.CreateEditBuilder(IGridHtmlHelper)

C#
protected abstract IGridDataCellBuilder CreateEditBuilderCore(IGridHtmlHelper htmlHelper)
Parameters:htmlHelperIGridHtmlHelperReturns:

IGridDataCellBuilder

Creates the Footer Builder.

C#
public IGridCellBuilder CreateFooterBuilder(IEnumerable<AggregateResult> aggregateResults)
Parameters:aggregateResultsIEnumerable<AggregateResult>Returns:

IGridCellBuilder

Implements: IGridColumn.CreateFooterBuilder(IEnumerable<AggregateResult>)

C#
protected virtual IGridCellBuilder CreateFooterBuilderCore(IEnumerable<AggregateResult> aggregateResults)
Parameters:aggregateResultsIEnumerable<AggregateResult>Returns:

IGridCellBuilder

Creates the Group Footer Builder.

C#
public IGridCellBuilder CreateGroupFooterBuilder(IEnumerable<AggregateResult> aggregatesResults)
Parameters:aggregatesResultsIEnumerable<AggregateResult>Returns:

IGridCellBuilder

Implements: IGridColumn.CreateGroupFooterBuilder(IEnumerable<AggregateResult>)

C#
protected virtual IGridCellBuilder CreateGroupFooterBuilderCore(IEnumerable<AggregateResult> aggregateResults)
Parameters:aggregateResultsIEnumerable<AggregateResult>Returns:

IGridCellBuilder

Creates the Header column Builder.

C#
public virtual IGridCellBuilder CreateGroupHeaderColumnBuilder(IEnumerable<AggregateResult> aggregatesResults)
Parameters:aggregatesResultsIEnumerable<AggregateResult>Returns:

IGridCellBuilder

Implements: IGridColumn.CreateGroupHeaderColumnBuilder(IEnumerable<AggregateResult>)

Creates the Header Builder.

C#
public IGridCellBuilder CreateHeaderBuilder()
Returns:

IGridCellBuilder

Implements: IGridColumn.CreateHeaderBuilder()

C#
protected virtual IGridCellBuilder CreateHeaderBuilderCore()
Returns:

IGridCellBuilder

Creates the Insert Builder.

C#
public IGridDataCellBuilder CreateInsertBuilder(IGridHtmlHelper htmlHelper)
Parameters:htmlHelperIGridHtmlHelperReturns:

IGridDataCellBuilder

Implements: IGridColumn.CreateInsertBuilder(IGridHtmlHelper)

C#
protected abstract IGridDataCellBuilder CreateInsertBuilderCore(IGridHtmlHelper htmlHelper)
Parameters:htmlHelperIGridHtmlHelperReturns:

IGridDataCellBuilder

C#
protected void Decorate(IGridDecoratableCellBuilder cellBuilder)
Parameters:cellBuilderIGridDecoratableCellBuilder
C#
protected override void Serialize(IDictionary<string, object> json)
Parameters:jsonIDictionary<string, object>

Overrides: JsonObject.Serialize(IDictionary<string, object>)