Skip to main content

WidgetTemplate

Namespace: Wisej.Web.Ext.Webix

Assembly: Wisej.Web.Ext.Webix (4.1.0.0)

Represents a Webix template.

public class WidgetTemplate

Templates in the Webix library are either plain global JavaScript functions, or HTML snippets using their template syntax.

Constructors​

Instance member WidgetTemplate()​

Initializes a new instance of WidgetTemplate.

Properties​

Instance member Id​

String: Returns or sets the identifier of the WidgetTemplate. It becomes the id of the script element that holds the template in the page. (Default: "")

Instance member Template​

String: Returns or sets the content of the WidgetTemplate: an HTML snippet that uses the Webix template syntax. (Default: "")

Example:

The following example defines a template that renders the name and email fields of a data item.

var template = new wxBase.WidgetTemplate
{
Id = "personTemplate",
Template = "<b>#name#</b><br/>#email#"
};

Instance member Type​

String: Returns or sets the type of the template. It becomes the type attribute of the script element that holds the template. Use "text/x-jsrender" for HTML templates. (Default: "text/x-jsrender")