Defines the fluent interface for configuring columns.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TColumn
TColumnBuilder
The type of the column builder.
Syntax:
public abstract class GridColumnBuilderBase<TColumn, TColumnBuilder> where TColumn : IGridColumn where TColumnBuilder : GridColumnBuilderBase<TColumn, TColumnBuilder>
Inheritance: objectGridColumnBuilderBase<TColumn, TColumnBuilder>
Derived Classes:
Inherited Members
Constructors
Initializes a new instance of the GridColumnBuilderBase<TColumn, TColumnBuilder> class.
protected GridColumnBuilderBase(TColumn column)
The column.
Properties
Column
TColumn
Gets or sets the column.
public TColumn Column { get; }
The column.
Methods
If set to false the column menu will not be rendered for the specific column.
public TColumnBuilder ColumnMenu(bool value)
If true the column menu will be rendered, otherwise not.
Returns:TColumnBuilder
Makes the column draggable or not. By default the columns are not draggable.
public TColumnBuilder Draggable(bool value)
If true the column is draggable, otherwise not.
Returns:TColumnBuilder
The configurator is used to configure the exportable setting of the column.
public TColumnBuilder Exportable(Action<GridColumnExportableBuilder> configurator)
The configurator.
Returns:TColumnBuilder
If set to false the column will be excluded from the exported Excel/PDF files.
public TColumnBuilder Exportable(bool value)
If true the column is exportable, otherwise not.
Returns:TColumnBuilder
Sets the HTML attributes applied to the header cell of the column.
public TColumnBuilder HeaderHtmlAttributes(IDictionary<string, object> attributes, bool encodeAttributes = true)
The attributes.
encodeAttributesboolIndicates whether the attributes will be encoded. By default the HtmlAttibutes are encoded.
Returns:TColumnBuilder
Sets the HTML attributes applied to the header cell of the column.
Sets the server-side header template for the column. If sorting is enabled, the template content wrapper must have a k-link CSS class.
public TColumnBuilder HeaderTemplate(Action template)
The action defining the template.
Returns:TColumnBuilder
Sets the header template for the column. If sorting is enabled, the template content wrapper must have a k-link CSS class.
public TColumnBuilder HeaderTemplate(string template)
The string defining the template.
Returns:TColumnBuilder
Hides a column. By default all columns are not hidden. Hidden columns are rendered in the output HTML but are hidden.
public TColumnBuilder Hidden()
TColumnBuilder
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 TColumnBuilder Hidden(bool value)
If true the column is hidden, otherwise not.
Returns:TColumnBuilder
Sets the HTML attributes applied to the content cell of the column.
public TColumnBuilder HtmlAttributes(IDictionary<string, object> attributes, bool encodeAttributes)
The attributes.
encodeAttributesboolIndicates whether the attributes will be encoded. By default the HtmlAttibutes are encoded.
Returns:TColumnBuilder
Sets the HTML attributes applied to the content cell of the column.
Sets name of the handler that sets the html attributes
public TColumnBuilder HtmlAttributes(string attributesHandler)
The attributes handler name.
Returns:TColumnBuilder
If set to false the column will remain in the side of the grid into which its own locked configuration placed it.
public TColumnBuilder Lockable(bool value)
If true the column is lockable, otherwise not.
Returns:TColumnBuilder
Makes the column static. By default all columns are not locked.
public TColumnBuilder Locked()
TColumnBuilder
Makes the column static or not. By default all columns are not locked.
public TColumnBuilder Locked(bool value)
If true the column is locked, otherwise not.
Returns:TColumnBuilder
Sets the media query condition that needs to be satisfied for a column to remain visible.
The pixel screen width below which the user will not be able to resize the column via the UI.
Sets the minimum screen width in pixels at which the column will become hidden.
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 be enabled.
public TColumnBuilder Resizable(bool value)
If false the column is not resizable.
Returns:TColumnBuilder
Makes the column stickable. By default all columns are not stickable.
public TColumnBuilder Stickable()
TColumnBuilder
Makes the column stickable or not. By default all columns are not stickable.
public TColumnBuilder Stickable(bool value)
If true the column is stickable, otherwise not.
Returns:TColumnBuilder
Makes the column sticky. By default all columns are not sticky.
public TColumnBuilder Sticky()
TColumnBuilder
Makes the column sticky or not. By default all columns are not sticky.
public TColumnBuilder Sticky(bool value)
If true the column is sticky, otherwise not.
Returns:TColumnBuilder
Sets the title displayed in the header of the column. Any HTML entities or tags should be encoded, or use a HeaderTemplate instead.
Makes the column visible or not. By default all columns are visible. Invisible columns are not rendered in the output HTML.
public TColumnBuilder Visible(bool value)
If true the column is visible, otherwise not.
Returns:TColumnBuilder
Sets the width of the column in pixels.
public TColumnBuilder Width(int pixelWidth)
The width in pixels.
Returns:TColumnBuilder
Sets the width of the column using CSS syntax.
public TColumnBuilder Width(string value)
The width to set.
Returns:TColumnBuilder