GridColumnTagHelper
Kendo UI GridColumn TagHelper GridColumnTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("column", ParentTag = "columns", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("filterable", new string[] { "commands", "columns", "sortable", "groupable", "exportable", "column-template", "column-editor-template" })]
[SuppressTagRendering]
public class GridColumnTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseGridColumnTagHelper
Derived Classes:
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-grid name="grid">
<columns>
<column field="Total" aggregates='new[] { "sum" }'></column>
</columns>
</kendo-grid>
Child Tags
Constructors
Initializes a new instance of the GridColumnTagHelper class.
public GridColumnTagHelper()
Properties
The aggregate(s) which are calculated when the grid is grouped by the columns field. The supported aggregates are "average", "count", "max", "min" and "sum". Use this setting to set the column aggregates when using an external DataSource.
public string[] Aggregates { get; set; }
If set to false the column menu will not be rendered for the specific column.
public bool? ColumnMenu { get; set; }
Makes the column draggable or not. By default the columns are not draggable.
public bool? Draggable { get; set; }
Sets the JavaScript function executed when the cell/row is about to be opened for edit. The result returned will determine whether an editor for the column will be created.
public string Editable { get; set; }
Sets the JavaScript function that can be used to specify a custom editing UI for the column. Use the container parameter to create the editing UI..
public string Editor { 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.
public bool? Encoded { get; set; }
The field to which the column is bound. The value of this field is displayed in the column's cells during data binding. Only columns that are bound to a field can be sortable or filterable. The field name should be a valid Javascript identifier and should contain only alphanumeric characters (or "$" or "_"), and may not start with a digit.
public string Field { get; set; }
Sets the HTML attributes applied to the footer cell of the column.
public IDictionary<string, object> FooterHtmlAttributes { get; set; }
Sets the client footer template for the column.
public string FooterTemplate { get; set; }
Sets the client footer template for the column.
public string FooterTemplateHandler { get; set; }
Enables or disables grouping by that column. All bound columns are groupable by default.
public bool? Groupable { get; set; }
Sets the client group footer template for the column.
public string GroupFooterTemplate { get; set; }
Sets the client group footer template for the column.
public string GroupFooterTemplateHandler { get; set; }
Sets the client group footer template for the column.
public IHtmlContent GroupFooterTemplateView { get; set; }
Sets the client group header column template for the column.
public string GroupHeaderColumnTemplate { get; set; }
Sets the client group header column template for the column.
public string GroupHeaderColumnTemplateHandler { get; set; }
Sets the client group template for the column.
public string GroupHeaderTemplate { get; set; }
Sets the client group template for the column.
public string GroupHeaderTemplateHandler { get; set; }
Sets the client group template for the column.
public IHtmlContent GroupHeaderTemplateView { get; set; }
Sets the HTML attributes applied to the header cell of the column.
public IDictionary<string, object> HeaderHtmlAttributes { get; set; }
Sets the header template for the column. If sorting is enabled, the template content wrapper must have a k-link CSS class.
public string HeaderTemplate { get; set; }
Sets the header template for the column. If sorting is enabled, the template content wrapper must have a k-link CSS class.
public string HeaderTemplateHandler { get; set; }
Makes the column hidden or not. By default all columns are not hidden. Hidden columns are rendered in the output HTML but are hidden.
public bool? Hidden { get; set; }
If set to true the column will be hidden when the grid is groupd via user interaction. The column will be displayed again if interaction to ungroup by it is performed.
public bool? HideOnGroup { get; set; }
Sets the HTML attributes applied to the content cell of the column.
public IDictionary<string, object> HtmlAttributes { get; set; }
The html attributes handler.
public string HtmlAttributesHandler { get; set; }
The handler name.
Specifies whether the columns should be included in column header menu. By default all columns are included. The column also need to have a Title set in order to be included in the menu.
public bool? IncludeInMenu { get; set; }
If set to false the column will remain in the side of the grid into which its own locked configuration placed it.
public bool? Lockable { get; set; }
Makes the column static. By default all columns are not locked.
public bool? Locked { get; set; }
Sets the media query condition that needs to be satisfied for a column to remain visible.
public string Media { get; set; }
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).
public bool? Menu { get; set; }
The pixel screen width below which the user will not be able to resize the column via the UI.
public int MinResizableWidth { get; set; }
Sets the minimum screen width in pixels at which the column will become hidden.
public int MinScreenWidth { get; set; }
If set to true a pin/unpin icon button will be rendered in the column cells, allowing users to pin or unpin individual rows.
public bool? Pinnable { get; set; }
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 functionality must be enabled.
public bool? Resizable { get; set; }
If set to true the grid will render a select column with checkboxes in each cell, thus enabling multi-row selection. The header checkbox allows users to select/deselect all the rows on the current page.
public bool? Selectable { get; set; }
Makes the column stickable. By default all columns are not stickable.
public bool? Stickable { get; set; }
Makes the column sticky. By default all columns are not sticky.
public bool? Sticky { get; set; }
Sets the handler function that returns the client template for the column.
public string TemplateHandler { get; set; }
Represents a collection of templates defined for the component.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Sets the client template for the column.
public IHtmlContent TemplateView { get; set; }
Sets the title displayed in the header of the column. Any HTML entities or tags should be encoded, or use a HeaderTemplate instead.
public string Title { get; set; }
Makes the column visible or not. By default all columns are visible. Invisible columns are not rendered in the output HTML.
public bool? Visible { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
SerializeGroupable method.
public void SerializeGroupable(IDictionary<string, object> settings)