WidgetFunction
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (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. (Default: "")
The name identifies the function on the client widget and is the name to use in the "()=>name" option values, see WidgetFunctions.
Source
String: Returns or sets the JavaScript source code of the WidgetFunction.
The value is the body of the function, without the function declaration. When the function is invoked using Call the arguments are available in arguments.
Example:
The following example adds a function that reloads the data of the grid and invokes it from the server.
this.igGrid1.WidgetFunctions = new[]
{
new igBase.WidgetFunction
{
Name = "reload",
Source = "this.widget.dataBind();"
}
};
// later, i.e. in a button click handler.
this.igGrid1.Call("reload");