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

Defines the fluent API for configuring the FormItem settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class FormItemBuilder<T> where T : class

Inheritance: objectFormItemBuilder<T>

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

Constructors

C#
public FormItemBuilder(FormItem settings, ViewContext viewContext, IUrlGenerator generator)
Parameters:settingsFormItemviewContextViewContextgeneratorIUrlGenerator

Methods

Defines the field size when grid layout is used. A fixed number defines the colspan for the form field. An array is used to map the colSpan to responsive breakpoints.

C#
public FormItemBuilder<T> ColSpan(Action<FormItemColSpanFactory<T>> configurator)
Parameters:configuratorAction<FormItemColSpanFactory<T>>

The action that configures the colspan.

Returns:

FormItemBuilder<T>

Defines the field size when grid layout is used.

C#
public FormItemBuilder<T> ColSpan(double value)
Parameters:valuedoubleReturns:

FormItemBuilder<T>

Maps to the model field which will be configured and sets the name of the input.

C#
public FormItemBuilder<T> Editor(Action<FormItemEditorBuilder<T>> configurator)
Parameters:configuratorAction<FormItemEditorBuilder<T>>Returns:

FormItemBuilder<T>

Defines the editor widget type. Available options are: DropDown widgets - "AutoComplete", "DropDownList", "ComboBox", "MultiSelect", "DropDownTree", "MultiColumnComboBox"; DatePicker widgets - "DateInput", "DatePicker", "DateTimePicker", "TimePicker"; Input widgets - "TextBox", "TextArea", "NumericTextBox", "MaskedTextBox", "RadioGroup", "CheckBoxGroup", "Switch", "Rating", "Slider", "ColorPicker", "ColorGradient", "ColorPalette", "FlatColorPicker", "hidden" or Editor widget - "Editor".

C#
public FormItemBuilder<T> Editor(string value)
Parameters:valuestring

The value that configures the editor.

Returns:

FormItemBuilder<T>

Maps to the model field which will be configured and sets the name of the input.

C#
public FormItemBuilder<T> Editor(TemplateBuilder<T> templateBuilder)
Parameters:templateBuilderTemplateBuilder<T>

The template component that specifies the editor.

Returns:

FormItemBuilder<T>

Maps to the model field which will be configured and sets the name of the input.

C#
public FormItemBuilder<T> Editor<TModel>(TemplateBuilder<TModel> templateBuilder)
Parameters:templateBuilderTemplateBuilder<TModel>

The template component that specifies the editor.

Returns:

FormItemBuilder<T>

The template which the widget will use to create the field editor.

C#
public FormItemBuilder<T> EditorTemplate(string value)
Parameters:valuestring

The value that configures the editortemplate.

Returns:

FormItemBuilder<T>

The template which the widget will use to create the field editor.

C#
public FormItemBuilder<T> EditorTemplateHandler(Func<object, object> value)
Parameters:valueFunc<object, object>

The value for EditorTemplate

Returns:

FormItemBuilder<T>

C#
public FormItemBuilder<T> EditorTemplateHandler(string value)
Parameters:valuestringReturns:

FormItemBuilder<T>

The template which the widget will use to create the field editor.

C#
public FormItemBuilder<T> EditorTemplateId(string value)
Parameters:valuestring

The value that configures the editortemplate.

Returns:

FormItemBuilder<T>

The template which the widget will use to create the field editor.

C#
public FormItemBuilder<T> EditorTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the editortemplate.

Returns:

FormItemBuilder<T>

Maps to the model field which will be configured and sets the name of the input.

C#
public FormItemBuilder<T> Field(string value)
Parameters:valuestring

The value that configures the field.

Returns:

FormItemBuilder<T>

Maps to the model field which will be configured and sets the name of the input.

C#
public FormItemBuilder<T> Field<TValue>(Expression<Func<T, TValue>> expression)
Parameters:expressionExpression<Func<T, TValue>>

The expression that specifies the field, based on the bound model.

Returns:

FormItemBuilder<T>

Defines the hint text that will be shown underneath the form editor.

C#
public FormItemBuilder<T> Hint(string value)
Parameters:valuestring

The value that configures the hint.

Returns:

FormItemBuilder<T>

Defines the field id.

C#
public FormItemBuilder<T> Id(string value)
Parameters:valuestring

The value that configures the id.

Returns:

FormItemBuilder<T>

Defines the attributes that are applied to the input element.

C#
public virtual FormItemBuilder<T> InputHtmlAttributes(IDictionary<string, object> attributes)
Parameters:attributesIDictionary<string, object>

The HTML attributes.

Returns:

FormItemBuilder<T>

Defines the attributes that are applied to the input element.

C#
public virtual FormItemBuilder<T> InputHtmlAttributes(object attributes)
Parameters:attributesobject

The HTML attributes.

Returns:

FormItemBuilder<T>

Defines the field label.

C#
public FormItemBuilder<T> Label(Action<FormItemLabelSettingsBuilder<T>> configurator)
Parameters:configuratorAction<FormItemLabelSettingsBuilder<T>>

The action that configures the label.

Returns:

FormItemBuilder<T>

Defines the field label.

C#
public FormItemBuilder<T> Label(string value)
Parameters:valuestringReturns:

FormItemBuilder<T>

Defines the field label.

C#
public FormItemBuilder<T> Name(string value)
Parameters:valuestring

The value that configures the label.

Returns:

FormItemBuilder<T>

Defines the field title.

C#
public FormItemBuilder<T> Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

FormItemBuilder<T>

Defines the type of the item - "fieldset" or "group".

C#
public FormItemBuilder<T> Type(string value)
Parameters:valuestring

The value that configures the type.

Returns:

FormItemBuilder<T>