WidgetFunction
Namespace: Wisej.Web.Ext.Webix
Assembly: Wisej.Web.Ext.Webix (4.1.0.0)
Represents a JavaScript function attached to the widget on the browser.
- C#
- VB.NET
public class WidgetFunction
Public Class WidgetFunction
Refer to "this" in the context of the function to target the wisej.web.Widget instance, and to "this.widget" to refer to the third party widget.
Constructors
WidgetFunction()
Initializes a new instance of WidgetFunction.
Properties
Name
String: Returns or sets the name of the WidgetFunction. It is the name used to add the function to the client widget and to reference it from the options. (Default: "")
Source
String: Returns or sets the JavaScript source code for the WidgetFunction: the body of the function, without the declaration.
Example:
The following example defines a function that reloads the data of the Webix view and invokes it from the server; "this.widget" is the Webix view.
var function = new wxBase.WidgetFunction
{
Name = "reload",
Source = "this.widget.clearAll(); this.widget.load('api/customers');"
};
this.table.WidgetFunctions = new[] { function };
// invoke the function from the server.
this.table.Call("reload");