Defines the fluent interface for configuring bound columns
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
T
The type of the data item
Syntax:
public class GridBoundColumnBuilder<T> : GridColumnBuilder<IGridBoundColumn, GridBoundColumnBuilder<T>> where T : class
Inheritance: objectGridColumnBuilderBase<IGridBoundColumn, GridBoundColumnBuilder<T>>GridColumnBuilder<IGridBoundColumn, GridBoundColumnBuilder<T>>GridBoundColumnBuilder<T>
Inherited Members
Constructors
Initializes a new instance of the GridBoundColumnBuilder<T> class.
public GridBoundColumnBuilder(IGridBoundColumn column, ViewContext viewContext, IUrlGenerator urlGenerator)
The column.
viewContextViewContextThe view context.
urlGeneratorIUrlGeneratorThe URL generator.
Methods
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 GridBoundColumnBuilder<T> Aggregates(string[] aggregates)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the client group header column template for the column.
public GridBoundColumnBuilder<T> ClientGroupHeaderColumnTemplate(string value)
The template
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
The JavaScript function that returns the client group header column template for the column.
public GridBoundColumnBuilder<T> ClientGroupHeaderColumnTemplateHandler(string value)
The JavaScript function name.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the client group template for the column.
public GridBoundColumnBuilder<T> ClientGroupHeaderTemplate(string value)
The template
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
The JavaScript function that returns the client group header template for the column.
public GridBoundColumnBuilder<T> ClientGroupHeaderTemplateHandler(string value)
The JavaScript function name.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the client group header template for the column.
public GridBoundColumnBuilder<T> ClientGroupHeaderTemplateView(IHtmlContent value)
The partial view that will be rendered within the template.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the client template for the column.
public GridBoundColumnBuilder<T> ClientTemplate(string value)
The template
Returns:Sets the client template for the column using a TemplateBuilder<TModel>.
public GridBoundColumnBuilder<T> ClientTemplate<TModel>(TemplateBuilder<TModel> templateBuilder)
The template builder.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
The JavaScript function that returns the client template for the column.
public GridBoundColumnBuilder<T> ClientTemplateHandler(string value)
The JavaScript function name.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the client template id for the column.
public GridBoundColumnBuilder<T> ClientTemplateId(string value)
The template id
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the client template for the column.
public GridBoundColumnBuilder<T> ClientTemplateView(IHtmlContent value)
The template view
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the editable function.
public GridBoundColumnBuilder<T> Editable(Func<object, object> editable)
The editable function in a text tag.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the editable function.
public GridBoundColumnBuilder<T> Editable(string editable)
The name of the JavaScript function that will determine if the cell will be editable.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the name of the component to be used as an editor template for the column.
public GridBoundColumnBuilder<T> EditorTemplateComponentName(string templateName)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Specify which editor template should be used for the column
public GridBoundColumnBuilder<T> EditorTemplateName(string templateName)
name of the editor template
Returns:Provides additional view data in the editor template for that column (if any).
public GridBoundColumnBuilder<T> EditorViewData(object additionalViewData)
An anonymous object which contains the additional data
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
The additional view data will be provided if the editing mode is set to in-line or in-cell. Otherwise use AdditionalViewData(object)
Enables or disables HTML encoding the data of the column. All bound columns are encoded by default.
public GridBoundColumnBuilder<T> Encoded(bool value)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Enables or disables filtering the column. Through the configurator you can configure the filter functionality.
public GridBoundColumnBuilder<T> Filterable(Action<GridBoundColumnFilterableBuilder> configurator)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Enables or disables filtering the column. All bound columns are filterable by default.
public GridBoundColumnBuilder<T> Filterable(bool value)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Gets or sets the format for displaying the data.
public GridBoundColumnBuilder<T> Format(string value)
The value.
Returns:Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Sets the sort configuration when grouping.
public GridBoundColumnBuilder<T> Groupable(Action<GridBoundColumnGroupableBuilder> configurator)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Enables or disables grouping by that column. All bound columns are groupable by default.
public GridBoundColumnBuilder<T> Groupable(bool value)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
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 GridBoundColumnBuilder<T> HideOnGroup(bool value)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Configures the sorting functionality of the column.
public GridBoundColumnBuilder<T> Sortable(Action<GridBoundColumnSortableBuilder> configurator)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.
Enables or disables sorting the column. All bound columns are sortable by default.
public GridBoundColumnBuilder<T> Sortable(bool value)
Returns the current GridBoundColumnBuilder<T> instance for method chaining.