TemplateBuilder class.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TModel
Syntax:
public class TemplateBuilder<TModel> : HelperResult, IHtmlContent
Inheritance: objectHelperResultTemplateBuilder<TModel>
Implements:
Inherited Members
Constructors
Initializes a new instance of the TemplateBuilder<TModel> class.
Methods
Defines a Telerik UI component into the template.
public TemplateBuilder<TModel> AddComponent(Action<WidgetFactory<TModel>> widgetBuilder)
The action that defines the Telerik UI component.
Returns:TemplateBuilder<TModel>
Returns the current TemplateBuilder<TModel> instance.
Allows setting combining conventional HTML elements with HtmlHelpers coming from the web framework.
public TemplateBuilder<TModel> AddHtml(Func<object, object> html)
The value that configures the HTML content.
Returns:TemplateBuilder<TModel>
Returns the current TemplateBuilder<TModel> instance.
Allows setting conventional HTML elements.
public TemplateBuilder<TModel> AddHtml(string html)
The value that configures the HTML content.
Returns:TemplateBuilder<TModel>
Returns the current TemplateBuilder<TModel> instance.
Serializes the template to a string that can be used in a form editor.
public string ToFormEditor()
A string representing the template serialized for form editing.
public override void WriteTo(TextWriter writer, HtmlEncoder encoder)
Overrides: