WidgetTemplate
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)
Represents an Ignite template.
- C#
- VB.NET
public class WidgetTemplate
Public Class WidgetTemplate
Templates in the Ignite library are either plain global JavaScript functions, or HTML snippets using their template syntax.
Each template assigned to WidgetTemplates is added to the page as a script element with the specified Id and Type.
Constructors
WidgetTemplate()
Initializes a new instance of WidgetTemplate.
Properties
Id
String: Returns or sets the identifier of the WidgetTemplate. (Default: "")
The identifier is used as the id of the script element that contains the template in the browser. It must be unique in the page: a template is not registered when an element with the same id already exists.
Template
String: Returns or sets the content of the WidgetTemplate. (Default: "")
Example:
The following example defines an HTML template that uses the Ignite UI template syntax to refer to the fields of the data item.
var template = new igBase.WidgetTemplate
{
Id = "productItemTemplate",
Template = "<b>${Name}</b> (${Category})"
};
Type
String: Returns or sets the type of the template. Use "text/x-jquery-tmpl" for HTML templates. (Default: "text/x-jquery-tmpl")
The value is used as the type attribute of the script element that contains the template. The default is "text/x-jquery-tmpl".